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

model.matrix.femlmR Documentation

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 class 'femlm'
model.matrix(object, data, ...)

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.

Value

It returns a design matrix.

Author(s)

Laurent Berge

See Also

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

Examples


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

head(model.matrix(res))




FENmlm documentation built on Aug. 22, 2023, 5:11 p.m.