ranef.VCA | R Documentation |
Extract random effects and possibly apply a transformation to them (standardization, studentization).
## S3 method for class 'VCA'
ranef(
object,
term = NULL,
mode = c("raw", "student", "standard"),
quiet = FALSE,
...
)
object |
(VCA) object from which random effects shall be extracted |
term |
(character) string specifying a term (factor) for which random effects should be extracted, one can also specify an integer which is interpreted as i-th element of 'obj$res.assign$terms' |
mode |
(character) string or abbreviation specifying whether "raw" residuals should be returned or a transformed version c("student" or "standard") |
quiet |
(logical) TRUE = will suppress any warning, which will be issued otherwise |
... |
additional parameters |
Extracting the 'RandomEffects' element of an 'VCA' object if this exists and applying
standardization (mean 0, sd 1) or studentization. For studentized random effects
the i-th random effects is divided by the i-th main diagonal element of matrix O = GZ^{T}QZG
,
where G
is the covariance-matrix of random effects, Z
is a design matrix assigning
random effects to observations and matrix Q = V^{-1}(I - H)
(see residuals.VCA
for further details).
Searle, S.R, Casella, G., McCulloch, C.E. (1992), Variance Components, Wiley New York
Laird, N.M., Ware, J.H., 1982. Random effects models for longitudinal data. Biometrics 38, 963-974.
Schuetzenmeister, A. and Piepho, H.P. (2012). Residual analysis of linear mixed models using a simulation approach. Computational Statistics and Data Analysis, 56, 1405-1416
## Not run:
data(dataEP05A2_1)
fit <- anovaVCA(y~day/run, dataEP05A2_1)
ranef(fit)
# get variable-specific random effects (REs)
# both extract the same REs
ranef(fit, "day")
ranef(fit, 1)
# get standardized REs
ranef(fit, "day:run", "standard")
# or studentized REs
ranef(fit, 2, "stu")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.