View source: R/helper_functions.R
RandEff_to_alpha012 | R Documentation |
#' Transforms standard deviations of random effects into a
correlation structure specified by \alpha_0, \alpha_1, \alpha_2
as defined in Li et al. (2018).
RandEff_to_alpha012(sigResid, tau, gamma, psi)
sigResid |
Residual standard deviation on individual level |
tau |
standard deviation of random cluster intercept |
gamma |
standard deviation of random time effect |
psi |
standard deviation of random subject specific intercept |
a list containing four named elements (possibly vectors or matrices):
alpha0
, alpha1
, alpha2
specify a correlation structure. SigMarg
denotes the marginal standard deviation
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 alpha012_to_RandEff()
RandEff_to_alpha012(sigResid=sqrt(11), tau=4, gamma=3, psi=2)
## The function is vectorised:
RandEff_to_alpha012(sigResid = matrix(c(0,1,2,3,4,5), 2, 3),
tau = matrix(c(1,1,1,0,0,0), 2, 3),
gamma = matrix(c(0,0,1,0,0,1), 2, 3),
psi = matrix(c(0,1,1,0,0,1), 2, 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.