NEWS (original) (raw)

bsitar 0.3.2

New features/additions

The bsitar now supports three different types of splines: 'rcs', 'nsp', and 'nsk'. While 'rcs' constructs the spline design matrix using the truncated power basis, both 'nsp' and 'nsk'implement a B-spline-based natural cubic spline basis. The truncated power basis method, often referred to as Harrell’s method, is implemented in the rcspline.eval() function of theHmisc package. The B-spline-based implementations of'nsp' and 'nsk' are the same as those described in the splines2 package. Previously, only'rcs' was available. Now, the default method is'nsp'.

The bsitar package allows for fitting the SITAR model with a four-parameter formulation (a + b + c + d), where a fourth parameter, d, is added. The parameterd, the age slope, allows the adult part of the growth curve to vary in slope. The age slope d represents the regression coefficient of y on x. Like thesitar package, the bsitar offers two parameterizations: one in which x is adjusted for the random effects b and c i.e.,(x-b)*exp(c), and the other in which the unadjustedx is used. This is controlled by the argumentd_adjusted provided in the bsitar::bsitar()function. When d_adjusted = TRUE, the first version is applied (x adjusted for random effects b andc), which means that individual developmental age, rather than chronological age, is used in the slope regression. This makes parameter d more sensitive to the timing of puberty in individuals. When d_adjusted = FALSE (the default), the unadjusted x is used. The default choice,d_adjusted = FALSE, is primarily to match the behavior of the sitar package, which setsd.adjusted = FALSE.

Added support for computing and comparing growth curves using themarginaleffects package as the back-end (seemarginal_draws(), marginal_comparison(), andgrowthparameters_comparison()). This enables the use of the computational flexibility offered by the marginaleffectspackage to estimate various quantities of interest, such as adjusted growth curves (distance and velocity), and growth parameters like age at peak growth velocity. All three functions support parallel computation via the future and doFuture packages.

The optimize_model() function now allows users to specify custom functions in optimize_x andoptimize_y when optimizing the Bayesian SITAR model. For example, it is now possible to useoptimize_x = list(function(x) log(x + 3/4)). Thanks to Tim Cole for suggesting this feature. This update greatly enhances the flexibility of optimize_model() and enables users to search for a range of optimal x and ytransformations.

An experimental feature has been added to use$pathfinder() based initial values for the MCMC sampling$sample() (via the argumentpathfinder_init = TRUE, default is FALSE). The arguments for $pathfinder() can be specified as a named list usingpathfinder_args. Note that this feature is only available when backend = 'cmdstanr'.

Added a new vignette comparing growth curves and growth parameters obtained from the frequentist (sitar package) and Bayesian (bsitar package) versions of the SITAR model applied to the height data.

Minor changes

The prior distribution for each parameter has been changed fromstudent_t() to normal(). The prior distribution for all parameters, including regression coefficients as well as the standard deviation (sd) for the group-level random effects and the distributional parameter (sigma), has been changed tonormal(). Previously, the distribution for regression coefficients and the sd for the group-level random effects wasstudent_t(), while the distribution for the sd of the distributional parameter (sigma) was exponential(). Note that the same location and scale parameters used earlier forstudent_t() are now used for the normal()distribution. For example, prior specified earlier asstudent_t(3, 0, 15) (3 degree of freedom, location 0 and scale) has been revised as normal(0, 15).

The default setting for initial values is now randomexcept for the population average parameters: size (a_init_beta), timing (b_init_beta), intensity (c_init_beta), and spline coefficients (s_init_beta). For size and spline coefficient parameters, the initial values are derived from the linear regression fit and specified as a_init_beta = lm ands_init_beta = lm. The initial values for both timing and intensity parameters are set to ‘0’, i.e., b_init_beta = 0and c_init_beta = 0.

Improved documentation

Bugfixes

The sigma_cov_init_beta = random argument was setting incorrect initial values for the covariates included in thesigma formula. The initial values for the Intercept (sigma_init_beta) were incorrectly applied to the covariates as well.

Miscellaneous

Users no longer need to set the environment toglobalenv(), i.e., envir = globalenv(), for post-processing functions to work properly. The environment is now automatically set to match the environment of the exposed functions. It is important to note that manually setting the environment (via theenvir argument) may result in errors. Theenvir argument is now primarily for internal use, which is needed during tests.

Minor corrections and changes have been made to improve the efficiency of the R code.

bsitar 0.2.1

New feature

Bugfixes

Miscellaneous

bsitar 0.1.1


New feature

Minor changes

Bugfixes

Miscellaneous