Learn R Programming

ppls (version 2.0.0)

coef.mypls: Extract Regression Coefficients from a mypls Object

Description

Returns the regression coefficients (without intercept) from an object of class mypls, typically produced by the function jack.ppls.

Usage

# S3 method for mypls
coef(object, ...)

Value

A numeric vector containing the regression coefficients corresponding to the penalized PLS model.

Arguments

object

An object of class mypls, which must contain the elements coefficients and covariance.

...

Additional arguments passed to methods (currently unused).

Details

This method returns the vector of regression coefficients associated with the penalized PLS fit stored in the mypls object. These coefficients can be used together with the variance-covariance matrix returned by vcov.mypls to construct confidence intervals or hypothesis tests.

References

N. Kraemer, A.-L. Boulesteix, and G. Tutz (2008). Penalized Partial Least Squares with Applications to B-Spline Transformations and Functional Data. Chemometrics and Intelligent Laboratory Systems, 94(1), 60–69. tools:::Rd_expr_doi("10.1016/j.chemolab.2008.06.009")

See Also

vcov.mypls, jack.ppls

Examples

Run this code
n <- 50  # number of observations
p <- 5   # number of variables
X <- matrix(rnorm(n * p), ncol = p)
y <- rnorm(n)

pls.object <- penalized.pls.cv(X, y)
my.jack <- jack.ppls(pls.object)
my.coef <- coef(my.jack)
print(my.coef)

Run the code above in your browser using DataLab