View source: R/fitted.galamm.R
| fitted.galamm | R Documentation |
Extracts fitted values from a model including random effects.
## S3 method for class 'galamm'
fitted(object, ...)
object |
An object of class |
... |
Optional arguments passed on to other methods. Currently not used. |
A numerical vector with fit values for each row in the input data.
Other details of model fit:
VarCorr(),
coef.galamm(),
confint.galamm(),
deviance.galamm(),
factor_loadings.galamm(),
family.galamm(),
fixef(),
formula.galamm(),
llikAIC(),
logLik.galamm(),
nobs.galamm(),
predict.galamm(),
print.VarCorr.galamm(),
ranef.galamm(),
residuals.galamm(),
response(),
sigma.galamm(),
vcov.galamm()
# Linear mixed model with heteroscedastic residuals
mod <- galamm(
formula = y ~ x + (1 | id),
weights = ~ (1 | item),
data = hsced
)
# Extract fitted values and plot against x
plot(hsced$x, fitted(mod))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.