Learn R Programming

FENmlm (version 2.4.4)

model.matrix.femlm: Design matrix of a femlm model

Description

This function creates a design matrix of the linear part of a femlm estimation. Note that it is only the linear part and the cluster variables (which can be considered as factors) are excluded from the matrix.

Usage

# S3 method for femlm
model.matrix(object, data, ...)

Value

It returns a design matrix.

Arguments

object

An object of class femlm. Typically the result of a femlm estimation.

data

If missing (default) then the original data is obtained by evaluating the call. Otherwise, it should be a data.frame.

...

Not currently used.

Author

Laurent Berge

See Also

femlm, formula.femlm, update.femlm, summary.femlm, vcov.femlm.

Examples

Run this code

# simple estimation on iris data, clustering by "Species"
res = femlm(Sepal.Length ~ Sepal.Width*Petal.Length +
            Petal.Width | Species, iris)

head(model.matrix(res))



Run the code above in your browser using DataLab