View source: R/helper_functions.R
alpha012_to_RandEff | R Documentation |
Transforms a correlation structure specified by \alpha_0, \alpha_1, \alpha_2
as defined in Li et al. (2018) into standard deviations of random effects.
alpha012_to_RandEff(alpha012, sigResid = NULL, sigMarg = NULL)
alpha012 |
A vector or a list of length 3. Each list element must have the same dimension(s). |
sigResid |
Residual standard deviation on individual level. Either residual sd or marginal sd needs to be specified. |
sigMarg |
Marginal standard deviation on individual level. Either residual sd or marginal sd needs to be specified. |
a list containing four named elements (possibly vectors or matrices):
random cluster intercept tau
,
random time effect gamma
,
random subject intercept psi
,
residual standard deviation sigResid
.
Li, F., Turner, E. L., & Preisser, J. S. (2018).
Sample size determination for GEE analyses of stepped wedge cluster randomized trials.
Biometrics, 74(4), 1450-1458. DOI: 10.1111/biom.12918
RandEff_to_icc()
, icc_to_RandEff()
or RandEff_to_alpha012()
alpha012_to_RandEff(alpha012=c(.1,.1,.1), sigMarg=1)
alpha012_to_RandEff(alpha012=c(.1,.1,.1), sigResid=.9486833)
## The function is vectorised:
alpha012_to_RandEff(alpha012=list(matrix(c(0,.1,.1,.2), 2, 2),
matrix(c(0,0,.1,.2) , 2, 2),
matrix(c(0,0,.2,.2) , 2, 2)),
sigMarg=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.