Learn R Programming

corregp (version 2.0.2)

coef.corregp: Extracting Coefficients from Correspondence Regression

Description

Method to extract the coefficients (i.e. scores) of a correspondence regression.

Usage

# S3 method for corregp
coef(object, parm = "x", axes = NULL, ...)

# S3 method for corregp coefficients(object, parm = "x", axes = 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 coefficients. Can be either "y", "x", or any vector of term names in X, level names in X or level names in Y. Defaults to "x".

axes

The axes for which to extract the coefficients: a vector of indices. Defaults to all the axes.

...

Further arguments passed to or from other methods.

Value

A matrix or vector with coefficients (i.e. scores) for the parameters and axes of interest.

Details

The coefficients in correspondence regression are the same as the coordinate scores.

See Also

fitted.corregp, residuals.corregp.

Examples

Run this code
# NOT RUN {
data(HairEye)
haireye.crg <- corregp(Eye ~ Hair * Sex, data = HairEye, b = 3000)
coef(haireye.crg, parm = c("Hair", "Sex"), axes = 1:2)
coefficients(haireye.crg, parm = c("Hair", "Sex"), axes = 1:2)
# }

Run the code above in your browser using DataLab