fitted.corregp: Extracting Fitted Values from Correspondence Regression

Description Usage Arguments Details Value See Also Examples

Description

Method to extract the fitted values of a correspondence regression.

Usage

1
2
3
4
5
## S3 method for class 'corregp'
fitted(object, parm = "all", nf = NULL, ...)

## S3 method for class 'corregp'
fitted.values(object, parm = "all", nf = NULL, ...)

Arguments

object

The output of a call to corregp (i.e. an object of class "corregp").

parm

The parameter for which to extract the fitted values. Can be "all", "both" (or abbreviations), "y" or "x" for the fitted values of every cell in the data, but it can also be any vector of term names in X or level names in X. Defaults to "all".

nf

The number of dimensions to be retained in the reduced space. Defaults to all dimensions (no reduction).

...

Further arguments passed to or from other methods.

Details

If all dimensions are retained, then the fitted values will only be equal to the observed counts if no conditioning factors were specified with the argument "part" in the corregp call. This is because the associations with the conditioning factors (in "part") are not taken into account.

Value

A matrix or vector with the fitted values for the parameters of interest, based on the selected number of dimensions.

See Also

coef.corregp, residuals.corregp.

Examples

1
2
3
4
data(HairEye)
haireye.crg <- corregp(Eye ~ Hair * Sex, data = HairEye, b = 3000)
fitted(haireye.crg, parm = c("Hair", "Sex"), nf = 2)
fitted.values(haireye.crg, parm = c("Hair", "Sex"), nf = 2)

corregp documentation built on May 1, 2019, 10:08 p.m.