fplsr(data, order = 6, type = c("simpls", "nipals"), unit.weights =
TRUE, weight = FALSE, beta = 0.1, interval = FALSE, method =
c("delta", "boota"), alpha = 0.05, B = 100, adjust = FALSE,
backh = 10)
(ncol(data$y)-1) x order
matrix containing the predictor scores.(ncol(data$y)-1) x order
matrix containing the response scores.fts
containing the column means of predictors.fts
containing the column means of responses.fts
containing the 1-step-ahead predicted values of the responses.fts
containing the fitted values.fts
containing the regression residuals.weight = TRUE
, a set of geometrically decaying weights is given. When weight = FALSE
, weights are all equal 1.fts
object, which can be obtained from colnames(data$y)
.fts
object, which can be obtained from data$x
.In a functional data set, the functional PLSR can be performed by setting the functional responses to be 1 lag ahead of the functional predictors. This idea has been adopted from the Autoregressive Hilbertian processes of order 1 (ARH(1)) of Bosq (2000).
Distributional forecasts: Parametric method:
Influenced by the works of Denham (1997) and Phatak et al. (1993), one way of constructing prediction intervals in the PLSR is via a local linearization method (also known as the Delta method). It can be easily understood as the first two terms in a Taylor series expansion. The variance of coefficient estimators can be approximated, from which an analytic-formula based prediction intervals are constructed.
Nonparametric method:
After discretizing and decentralizing functional data $f_t(x)$ and $g_s(y)$, a PLSR model with $K$ latent components is built. Then, the fit residuals $o_s(y_i)$ between $g_s(y_i)$ and $\hat{g}_s(y_i)$ are calculated as $$o_s(y_i)=g_s(y_i)-\hat{g}_s(y_i), i=1,...,p.$$
The next step is to generate $B$ bootstrap samples $o_s^b(y_i)$ by randomly sampling with replacement from $[o_1(y_i),...,o_n(y_i)]$. Adding bootstrapped residuals to the original response variables in order to generate new bootstrap responses, $$g_s^b(y_i)=g_s(y_i)+o_s^b(y_i).$$ Then, the PLSR models are constructed using the centered and discretized predictors and bootstrapped responses to obtain the boostrapped regression coefficients and point forecasts, from which the empirical prediction intervals and kernel density plots are constructed.
S. de Jong (1993) "SIMPLS: an alternative approach to partial least square regression", Chemometrics and Intelligent Laboratory Systems, 18(3), 251-263.
C J. F. Ter Braak and S. de Jong (1993) "The objective function of partial least squares regression", Journal of Chemometrics, 12(1), 41-54.
B. Dayal and J. MacGregor (1997) "Recursive exponentially weighted PLS and its applications to adaptive control and prediction", Journal of Process Control, 7(3), 169-179.
B. D. Marx (1996) "Iteratively reweighted partial least squares estimation for generalized linear regression", Technometrics, 38(4), 374-381.
L. Xu and J-H. Jiang and W-Q. Lin and Y-P. Zhou and H-L. Wu and G-L. Shen and R-Q. Yu (2007) "Optimized sample-weighted partial least squares", Talanta, 71(2), 561-566.
A. Phatak and P. Reilly and A. Penlidis (1993) "An approach to interval estimation in partial least squares regression", Analytica Chimica Acta, 277(2), 495-501.
M. Denham (1997) "Prediction intervals in partial least squares", Journal of Chemometrics, 11(1), 39-52.
D. Bosq (2000) Linear processes in function spaces, New York: Springer.
N. Faber (2002) "Uncertainty estimation for multivariate regression coefficients", Chemometrics and Intelligent Laboratory Systems, 64(2), 169-179.
J. A. Fernandez Pierna and L. Jin and F. Wahl and N. M. Faber and D. L. Massart (2003) "Estimation of partial least squares regression prediction uncertainty when the reference values carry a sizeable measurement error", Chemometrics and Intelligent Laboratory Systems, 65(2), 281-291.
P. T. Reiss and R. T. Ogden (2007), "Functional principal component regression and functional partial least squares", Journal of the American Statistical Association, 102(479), 984-996.
A. Delaigle and P. Hall (2012), "Methodology and theory for partial least squares applied to functional data", Annals of Statistics, 40(1), 322-352.
C. Preda, G. Saporta (2005) "PLS regression on a stochastic process", Computational Statistics and Data Analysis, 48(1), 149-158.
C. Preda, G. Saporta, C. Leveder (2007) "PLS classification of functional data", Computational Statistics, 22, 223-235.
ftsm
, forecast.ftsm
, plot.fm
,
summary.fm
, residuals.fm
, plot.fmres
# When weight = FALSE, all observations are assigned equally.
# When weight = TRUE, all observations are assigned geometrically decaying weights.
fplsr(ElNino, order = 6, type = "nipals")
fplsr(data = ElNino, order = 6)
fplsr(data = ElNino, weight = TRUE)
fplsr(data = ElNino, unit.weights = FALSE)
fplsr(data = ElNino, unit.weights = FALSE, weight = TRUE)
# The prediction intervals are calculated numerically.
fplsr(data = ElNino, interval = TRUE, method = "delta")
# The prediction intervals are calculated by bootstrap method.
fplsr(data = ElNino, interval = TRUE, method = "boota")
Run the code above in your browser using DataLab