Computes the standardized and raw coefficients of a PLS regression, with p-values and confidence intervals from a jackknife procedure.

get_coef(object, y = NULL, ncomp = NULL,
 ci = 0.95, raw = FALSE)

Arguments

object

an object of class mvr from pls package. It must be cross-validated with jackknife = TRUE

y

the name of the response variable whose coefficients are plotted. If NULL (default), the first response variable is used.

ncomp

the number of components to use for computing coefficients

ci

the confidence level of the confidence interval. Default is 0.95.

raw

logical. If FALSE (default), standardized coefficients are computed. If TRUE, raw coefficients are computed.

Value

A data frame with coefficients, standard deviation, t-values, p-values and confidence intervals.

References

Martens, H., Næs, T. (1989) Multivariate calibration. Chichester: Wiley.

Tenenhaus, M. (1998) La Regression PLS. Theorie et Pratique. Editions TECHNIP, Paris.

Author

Nicolas Robette

See also

Examples

library(pls)
data(yarn)
pls <- mvr(density ~ NIR,
           ncomp = 5,
           data = yarn,
           validation = "CV",
           method = "oscorespls",
           jackknife = TRUE)
res <- get_coef(pls)
head(res)
#>      coefficients std error t-value p-value     2.5%   97.5%
#> NIR1     -1.17513   1.23516  -0.951 0.36625 -3.70947 1.35921
#> NIR2     -1.67001   1.05821  -1.578 0.14899 -3.84128 0.50125
#> NIR3     -1.57675   0.77924  -2.023 0.07371 -3.17562 0.02213
#> NIR4     -0.43207   0.62576  -0.690 0.50731 -1.71603 0.85189
#> NIR5      0.73404   0.45829   1.602 0.14369 -0.20630 1.67437
#> NIR6      1.32103   0.36179   3.651 0.00531  0.57870 2.06335