gpls | R Documentation |
Partial least squares is a commonly used dimension reduction technique. The paradigm can be extended to include generalized linear models in several different ways. The code in this function uses the extension proposed by Ding and Gentleman, 2004.
gpls(x, ...)
## Default S3 method:
gpls(x, y, K.prov=NULL, eps=1e-3, lmax=100, b.ini=NULL,
denom.eps=1e-20, family="binomial", link=NULL, br=TRUE, ...)
## S3 method for class 'formula'
gpls(formula, data, contrasts=NULL, K.prov=NULL,
eps=1e-3, lmax=100, b.ini=NULL, denom.eps=1e-20, family="binomial",
link=NULL, br=TRUE, ...)
x |
The matrix of covariates. |
formula |
A formula of the form 'y ~ x1 + x2 + ...', where
|
y |
The vector of responses |
data |
A data.frame to resolve the forumla, if used |
K.prov |
number of PLS components, default is the rank of X |
eps |
tolerance for convergence |
lmax |
maximum number of iteration allowed |
b.ini |
initial value of regression coefficients |
denom.eps |
small quanitity to guarantee nonzero denominator in deciding convergence |
family |
glm family, |
link |
link function, |
br |
TRUE if Firth's bias reduction procedure is used |
... |
Additional arguements. |
contrasts |
an optional list. See the |
This is a different interface to the functionality provided by
glpls1a
. The interface is intended to be simpler to use
and more consistent with other matchine learning code in R.
The technology is intended to deal with two class problems where
there are more predictors than cases. If a response variable
(y
) is used that has more than two levels the behavior may
be unusual.
An object of class gpls
with the following components:
coefficients |
The estimated coefficients. |
convergence |
A boolean indicating whether convergence was achieved. |
niter |
The total number of iterations. |
bias.reduction |
A boolean indicating whether Firth's procedure was used. |
family |
The |
link |
The |
terms |
The constructed terms object. |
call |
The call |
levs |
The factor levels for prediction. |
B. Ding and R. Gentleman
Ding, B.Y. and Gentleman, R. (2003) Classification using generalized partial least squares.
Marx, B.D (1996) Iteratively reweighted partial least squares estimation for generalized linear regression. Technometrics 38(4): 374-381.
glpls1a
library(MASS)
m1 = gpls(type~., data=Pima.tr, K=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.