Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

predModule-class

Class "predModule" and SubClasses


Description

The class "predModule" and notably its subclasses "dPredModule" and "sPredModule" encapsulate information about linear predictors in statistical models. They incorporate a modelMatrix, the corresponding coefficients and a representation of a triangular factor from the, possibly weighted or otherwise modified, model matrix.

Objects from the Classes

Objects are typically created by coercion from objects of class ddenseModelMatrix or dsparseModelMatrix.

Slots

The virtual class "predModule" and its two subclasses all have slots

X:

a modelMatrix.

coef:

"numeric" coefficient vector of length ncol(.):= p.

Vtr:

"numeric" vector of length p, to contain V'r (“V transposed r”).

fac:

a representation of a triangular factor, the Cholesky decomposition of V'V.

The actual classes "dPredModule" and "sPredModule" specify specific (sub) classes for the two non-trivial slots,

X:

a "ddenseModelMatrix" or "dsparseModelMatrix", respectively.

fac:

For the "dpredModule" class this factor is a Cholesky object. For the "spredModule" class it is of class CHMfactor.

Methods

coerce

signature(from = "ddenseModelMatrix", to = "predModule"): Creates a "dPredModule" object.

coerce

signature(from = "dsparseModelMatrix", to = "predModule"): Creates an "sPredModule" object.

Author(s)

Douglas Bates

See Also

model.Matrix() which returns a "ddenseModelMatrix" or "dsparseModelMatrix" object, depending if its sparse argument is false or true. In both cases, the resulting "modelMatrix" can then be coerced to a sparse or dense "predModule".

Examples

showClass("dPredModule")
showClass("sPredModule")

## see   example(model.Matrix)

MatrixModels

Modelling with Sparse and Dense Matrices

v0.5-0
GPL (>= 2)
Authors
Douglas Bates <bates@stat.wisc.edu> and Martin Maechler <maechler@stat.math.ethz.ch>
Initial release
2021-03-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.