View source: R/helper_functions.R
RandEff_to_alpha012 | R Documentation |
Correlation structure: transform random effects to alpha
RandEff_to_alpha012(sigResid, tau, gamma, psi)
sigResid |
Residual standard deviation on individual leve |
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 matrices): 'alpha0', 'alpha1', 'alpha2' specify a correlation structure and SigMarg denotes the marginal standard deviation
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.