extractors: Functions to extract various components of a fit
Description
logLik extracts the log-likelihood (exact or approximated).
fitted extracts fitted values (see fitted.values).
fixef extracts the fixed effects coefficients, $\beta$.
ranef extracts the predicted random effects, $u$.
vcov returns the variance-covariance matrix of the fixed-effects coefficients.
predictionCoeffs precomputes coefficients for prediction (see predict for an example)
Usage
## S3 method for class 'HLfit':
logLik(object,REML,...)
## S3 method for class 'HLfit':
fitted(object,...)
## S3 method for class 'HLfit':
fixef(object,...)## S3 method for class 'HLfit':
ranef(object,...)
## S3 method for class 'HLfit':
vcov(object,...)
predictionCoeffs(object)
Arguments
object
The return object of an HLfit or similar function.
REML
If TRUE, the function returns the log restricted likelihood (exact or approximated).
...
Other arguments that may be needed by some method.
Value
All return values are numeric (for logLik) or vectors (most cases) or matrices (for vcov). ranef returns a vector with attributes,
which inherits from class ranef which has its own (undocumented) print method.
data(wafers)
m1 <- HLfit(y ~X1+X2+(1|batch),
resid.formula = ~ 1 ,data=wafers,HLmethod="ML")
fixef(m1)
vcov(m1)
ranef(m1)
## see 'predict' for a example with predictionCoeffs