ttest.ppls {ppls} | R Documentation |
t-Test for Penalized PLS Regression Coefficients
Description
Computes two-sided t-tests and p-values for the regression coefficients of a penalized PLS model based on jackknife estimation.
Usage
ttest.ppls(
ppls.object,
ncomp = ppls.object$ncomp.opt,
index.lambda = ppls.object$index.lambda
)
Arguments
ppls.object |
An object returned by |
ncomp |
Integer. Number of PLS components to use. Default is |
index.lambda |
Integer. Index of the penalty parameter |
Details
This function calls jack.ppls
to estimate:
The mean of the jackknife coefficients (point estimates),
The covariance matrix (for standard errors),
The degrees of freedom, equal to
k - 1
, wherek
is the number of cross-validation folds.
It then performs standard two-sided t-tests:
t_j = \frac{\hat{\beta}_j}{\text{SE}_j}, \quad \text{df} = k - 1
and computes associated p-values.
These p-values can be used for variable selection or inference, although they are based on cross-validation folds and should be interpreted with caution.
Value
A list with:
- tvalues
Numeric vector of t-statistics.
- pvalues
Numeric vector of two-sided p-values.
See Also
jack.ppls
, coef.mypls
, vcov.mypls
Examples
set.seed(123)
X <- matrix(rnorm(20 * 100), ncol = 20)
y <- rnorm(100)
result <- penalized.pls.cv(X, y, lambda = c(0, 1), ncomp = 3)
tstats <- ttest.ppls(result)
print(tstats$pvalues)