fit: PLS fit

Description Usage Arguments Value Author(s) Examples

View source: R/Fit (2).R

Description

The function fit performs partial least squares regression for the multivariate case (i.e. more than one response variable)

Usage

1
2
3
4
5
6
7
8
9
 fit(formula,data,ncomp=2,scale=T)
## Default S3 method:
fit(formula, data, ...)
## S3 method for class 'PLSDA'
print(x, ...)
## S3 method for class 'PLSDA'
summary(object, ...)
## S3 method for class 'PLSDA'
predict(object, newdata=NULL, ...) 

Arguments

formula

a symbolic description of the model to be fit.

data

an data frame containing explivatives and explained variables in the model.

scale

boleean. If scale = TRUE, each block is standardized to zero means and unit variances (default: TRUE)

object

an object of class "PLSDA", i.e., a fitted model.

...

not used.

Value

An object of class PLSDA, basically a list including elements

x.scores

components of the predictor variables (also known as T-components)

x.loads

loadings of the predictor variables

y.scores

components of the response variables (also known as U-components)

y.loads

loadings of the response variables

expvar

table with R-squared coefficients

Author(s)

Houda Quentin Faly

Examples

1
2
3
4
  data(iris)
  mod1 <- fit(Hwt~Bwt*Sex, data=iris)
  mod1
  summary(mod1) 

Falyy/package documentation built on May 21, 2019, 10:09 a.m.