Learn R Programming

LMMsolver (version 1.0.10)

coef.LMMsolve: Coefficients from the mixed model equations of an LMMsolve object.

Description

Obtain the coefficients from the mixed model equations of an LMMsolve object.

Usage

# S3 method for LMMsolve
coef(object, se = FALSE, ...)

Value

A list of vectors, containing the estimated effects for each fixed effect and the predictions for each random effect in the defined linear mixed model.

Arguments

object

an object of class LMMsolve

se

calculate standard errors, default FALSE.

...

some methods for this generic require additional arguments. None are used in this method.

Examples

Run this code
## Fit model on john.alpha data from agridat package.
data(john.alpha, package = "agridat")

## Fit simple model with only fixed effects.
LMM1 <- LMMsolve(fixed = yield ~ rep + gen,
                data = john.alpha)

## Obtain coefficients.
coefs1 <- coef(LMM1)

## Obtain coefficients with standard errors.
coefs2 <- coef(LMM1, se = TRUE)

Run the code above in your browser using DataLab