NEWS
sitar 1.4.1
- predict.sitar now calculates velocity by differentiating each point (as dy/dx)
rather than differentiating the mean spline curve. This means it handles
velocities at a single age, and can return predicted distance and velocity
for both levels 0 and 1.
- The d random effect now has an alternative parameterisation, controlled by
the sitar argument d.adjusted. The age slope d is the regression coefficient
of y on x, and when d.adjusted == TRUE x is first adjusted for random
effects b and c, reflecting individual developmental age rather than
chronological age. This makes d more sensitive to the timing of puberty
in individuals.
sitar 1.4.0 (2023-06-23)
- plot.sitar plots multiple curves for options 'd' and 'v' when the model
includes categorical variables.
- plot.sitar option 'V' returns velocity curves that are both faster and
more accurate.
- xyadj is extended to convert velocity from/to the mean.
- If df > 1 and random = 'a+b+c+d' then fixed = 'a+b+c' by default.
- If df = 1 in sitar then fixed effects b and d are excluded.
- the function identity is now recognised by ifun.
- Bugs in update.sitar and BICadj relating to the keep.data argument are fixed.
- An egregious bug with factor covariates in predict.sitar is fixed.
- The fitnlme function in sitar is simplified.
- A bug in ob_convertr2 handling missing data is fixed.
sitar 1.3.0 (2022-07-20)
- Typos in the berkeley dataset reported as issue #7 are fixed.
- The argument keep.data is added to sitar with default TRUE. This saves a
copy of the data in the object, which avoids some environment issues.
- ob_convertr is rewritten and extended with the addition of ob_convertr2, and
is now much faster. As a result the interface is altered - a breaking change.
- The dataset deren example is updated to match the revised ob_convertr.
sitar 1.2.0 (2021-04-22)
- The dataset deren is added for use with ob_convertr.
- A function ob_convertr is added which converts child prevalence rates for
underweight, overweight or obesity from one reference cutoff to another.
- dfpower is extended to include fixed effects for a-b-c-d as well as spline
degrees of freedom and powers of x and y. It also now passes the control
arg if set and refits the target object.
- A major extension to the SITAR model is to add a fourth random effect
called d, which is the age slope. It allows the simple random intercept
random slope model to be fitted, but it also extends the usual SITAR model by
allowing the adult portion of the growth curve to vary in slope.
- A breaking change fixes the prediction and plotting of mean curves for models
with fewer fixed effects than random effects, e.g. random = 'a + b + c' and
fixed = 'a + b'. The mean curve now corresponds to the mean of the fitted
random effects, whereas before it did not.
- The fitted SITAR model now includes an element 'constants', a data frame
giving the mean values of a-b-c-d indexed by unique levels of covariates
where fitted. Can be useful for models with complex fixed effects.
- Two functions optimal_design and nagegp are added for the optimal design of
group reference centile studies - see Cole (Statistical Methods in Medical
Research, 2020). A vignette has also been added describing how to use them.
- The cdc2000 and iotf datasets are added.
- The who0607 dataset is added, extending who06 to age 19 for height, weight
and BMI.
- The ukwhoterm dataset is added, similar to ukwhopt but excluding infants
born preterm.
- The ukwhopt dataset is extended to cover age 26 weeks gestation to 20 years.
- apv_se is updated to work with the latest version of rtidy.
- LMS2z is extended to handle disjunct references, where the centiles have a
break or disjunction. Sex is also checked for more carefully.
- sitar has a new argument pdDiag, which forces the random effects covariance
matrix to be diagonal. Convergence can be much quicker, though the model may
fit less well.
- pdLMS density calculation corrected.
- In plot.sitar, transformations of x / y using xfun / yfun are now applied
after back-transforming x / y to their original scales.
- getPeakTrough algorithm improved, and takeoff argument added for use with
velocity curves to identify age at takeoff.
- Methods getPeak, getTrough and getTakeoff are added as special cases of
getPeakTrough.
sitar 1.1.1 (2019-03-12)
- trim (new) option in plot.sitar to remove unsightly long lines from plots.
- For trim to work, mplot now allows rows with missing data.
- apv_se (new) bootstraps standard errors for peak velocity (pv) and age at pv.
- getPeakTrough now uses xy.coords and returns NA if no turning points.
- Fix several bugs in plot.sitar, involving subset with predict, dashed line
for velocity, and axis 4 etc.
- BREAKING CHANGE - options 'dv' with subset in plot.sitar now work as they
should, showing mean curves for the subset selected.
- predict.sitar improved so individual velocity curves (option V) now plot
correctly when y and/or t are transformed.
- Fix bugs in xyadj improving the defaults for y and id, and making abc a
data frame and adding missing columns.
- msMaxIter default in nlmeControl doubled to 100.
- getData.sitar now based on getData.nlme not getData.lme.
- LMS2z now requires 'measure' to be character, changing example accordingly.
Also the specification of the sex argument has been improved and extended.
sitar 1.1.0 (2018-06-19)
- plot.sitar now allows data output for plotting in ggplot2 etc.
- plot.sitar now applies apv to multiple curves (options D and V).
- Fix bug in plot.sitar with options dv.
- Add vignette Fitting models in SITAR.
- Add berkeley dataset.
- cLMS and zLMS now return a matrix if z or x are matrices.
- LMS2z now returns a matrix if y is a matrix.
- Fix bug in z2cent for 11th, 12th and 13th centiles.
- pdLMS (new) plots density function(s) of Box-Cox transformed variable(s).
- mplot now omits rows with missing data.
- predict.sitar now recognises special case of .x and .id in newdata.
sitar 1.0.10 (2017-09-15)
- getPeakTrough (new) identifies peaks and troughs of a curve
(used to improve code for age at peak velocity - replaces makess).
- AICadj and BICadj now adjust for subset, and code improved.
- dfpower (new) tabulates BIC/AIC for SITAR models by degrees of freedom
and/or xy power transformations.
- getL (new) extracts the power transform of a variable in an expression.
- dfset (new) identifies optimal degrees of freedom for a natural
spline curve.
- Improve label handling in plot.sitar.
- Fix bug in update.sitar with df and xoffset.
- Fix bug in predict.sitar when b.formula = ~covariate - 1.
- Fix bug in predict.sitar with abc.
- Constrain df to be >1 in sitar.
- Fix bug in sitar with make.names.
sitar 1.0.9 (2017-01-09)
- Fix bug in sitar with subset.
- Improve ifun call, code and documentation, adding verbose arg and
returning varname as attribute.
- Reorder args in xyadj.
- Fix bug in y2plot with par(mar).
- Add lag, differences, sort and keepNA to diffid args.
- Fix bug in predict.sitar concerning id in newdata.
- Improve handling of ... args in plot.sitar with D and V options.
sitar 1.0.8 (2016-10-18)
- timegap (new) indexes equally spaced ages, to simplify binning age
into age groups.
- Use dynGet instead of get in BICadj.
- Improve handling of y2 axis in y2plot.
- Fix bug in plot.sitar introduced in 1.0.7.
sitar 1.0.7 (2016-07-31)
- Add github URL to DESCRIPTION.
- Documentation and NAMESPACE now generated by Roxygen2, and S3 methods
no longer visible.
- Extend ifun to handle cospi, sinpi and tanpi, and improve documentation.
- Extend predict.sitar to handle deriv 2 (acceleration).
- Extend sitar to allow functions in a.formula, b.formula and c.formula.
Improve documentation for this case.
- Fix bug in sitar where the start vector is the wrong length.
- Fix bug in predict.sitar involving default value of yfun argument.
- Fix bug in predict.sitar for when a.formula, b.formula and c.formula
involve a single variable.
sitar 1.0.6 (2016-05-05)
- Tidied up code in predict.sitar and xyadj, altering the defaults for abc, xfun and yfun.
The asList argument in predict.nlme and level == 0:1 now work correctly.
- Fixed a bug in predict.sitar involving covariates in newdata (Costanza Pizzi).
Factors in newdata are now represented as factor = level rather than
factorlevel = [01] as before.
- Fixed a bug in plot.sitar involving subset with options d and v (Costanza Pizzi).
- Fixed a bug in plot.sitar involving subset with options D and V.
sitar 1.0.5 (2016-04-12)
- xoffset and bstart rationalised in sitar and update.sitar. Now xoffset defaults to mean(x)
and bstart defaults to xoffset, leading to greater stability in model fitting.
This is a more complete solution to issue 2 in 1.0.4. Note that models fitted
in previous versions need to be refitted.
sitar 1.0.4 (2016-03-23)
- update.sitar code updated and simplfied.
- in sitar and update.sitar the offset for knots and bounds changed
from bstart to mean(x) (suggestion of Jeroen Sichien).
- LMS2z loses data argument.
- LMS2z, cLMS and zLMS now return a vector or a matrix.
- predict.sitar and plot.sitar now create function fitnlme on the fly when it's missing.
- sitar handling for weights commented out.
- ifun bugs fixed and code simplified.
- man pages updated.
sitar 1.0.3 (2015-07-27)
- The heights database had age at menarche added.
- In plot.sitar ifun was used to automatically back-transform transformations
of x and/or y in the sitar model.
- ifun (new) inverts an expression defining a data transformation.
- xyadj (new) adjusts x and y variables for SITAR random effects.
- predict.sitar was extended with a deriv argument to give predicted velocity.
- getCovariate and anova methods for sitar were added.
- In plot.sitar new options D and V provide spline curves of individual
distance and velocity curves.
- In sitar and plot.sitar bugs were fixed and code simplified by use of
predict.sitar, xyadj and ifun.
sitar 1.0.2 (2015-04-21)
- In DESCRIPTION the title and description were corrected, and Suggests
was changed to Imports.
- In NAMESPACE lines.sitar and print.summary.sitar were added to S3 methods
and splines was added to import (both previously omitted in error).
- predict, getVarCov and getData methods for sitar were added.
- The sitar command was rewritten to save the function fitnlme, for use
with predict. As a result the hidden file .fitnlme is no longer created.
- The plot.sitar command now uses predict to control the number of points
when drawing spline curves, and any covariate values default to zero.
- LMSfit was added.
- lms2z was renamed LMS2z for consistency.
- The changes in 1.0.1 to the graphical options xaxsd and yaxsd to deal
with log scales were corrected.
- The man files were updated.
sitar 1.0.1 (2014-06-27)
- The environment for reading the call in sitar, plot.sitar and lines.sitar
was corrected.
- The graphical options xaxsd and yaxsd were extended to deal with log scales.
sitar 1.0 (2014-04-08)
- First CRAN release of package "sitar" for growth curve analysis.