Learn R Programming

mdatools (version 0.8.2)

getRegcoeffs.pls: Regression coefficients for PLS model'

Description

Returns a matrix with regression coefficients for the PLS model which can be applied to a data directly

Usage

# S3 method for pls
getRegcoeffs(obj, ncomp = NULL, ny = NULL, full = FALSE,
  ...)

Arguments

obj

a PLS model (object of class pls)

ncomp

number of components to return the coefficients for

ny

if y is multivariate which variables you want to see the coefficients for

full

if TRUE the method also shows p-values for the coefficients (if available)

...

other parameters

Value

A matrix (n of predictors x n of responses) with regression coefficients.

Details

The method recalculates the regression coefficients found by the PLS algorithm taking into account centering and scaling of predictors and responses, so the matrix with coefficients can be applied directly to original data (yp = Xb).

If number of components is not specified, the optimal number, selected by user or identified by a model will be used.