Skip to contents

Extracts fitted values from a model including random effects.

Usage

# S3 method for class 'galamm'
fitted(object, ...)

Arguments

object

An object of class galamm returned from galamm.

...

Optional arguments passed on to other methods. Currently not used.

Value

A numerical vector with fit values for each row in the input data.

Examples

# 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))