predict.dbplsr {dbstats} | R Documentation |
predict.dbplsr
returns the predicted values, obtained by evaluating the
Distance-based partial least squares function in the new data (newdata
).
newdata
can be the values of the explanatory variables of these new
cases, the squared distances between these new individuals
and the originals ones, or rows of new doubly weighted and centered inner
products matrix G.
## S3 method for class 'dbplsr'
predict(object,newdata,type.var="Z",...)
object |
an object of class |
newdata |
data.frame or matrix which contains the values of Z (if |
type.var |
set de type of newdata. Can be |
... |
arguments passed to or from other methods to the low level. |
predict.dbplsr
produces a vector of predictions for the k new individuals.
Look at which way (or type.var
) was made the dbplsr
call.
The parameter type.var
must be consistent with the data type that is
introduced to dbplsr
.
Boj, Eva <evaboj@ub.edu>, Caballe, Adria <adria.caballe@upc.edu>, Delicado, Pedro <pedro.delicado@upc.edu> and Fortiana, Josep <fortiana@ub.edu>
Boj E, Delicado P, Fortiana J (2010). Distance-based local linear regression for functional predictors. Computational Statistics and Data Analysis 54, 429-437.
Boj E, Grane A, Fortiana J, Claramunt MM (2007). Implementing PLS for distance-based regression: computational issues. Computational Statistics 22, 237-248.
Boj E, Grane A, Fortiana J, Claramunt MM (2007). Selection of predictors in distance-based regression. Communications in Statistics B - Simulation and Computation 36, 87-98.
Cuadras CM, Arenas C, Fortiana J (1996). Some computational aspects of a distance-based model for prediction. Communications in Statistics B - Simulation and Computation 25, 593-609.
Cuadras C, Arenas C (1990). A distance-based regression model for prediction with mixed data. Communications in Statistics A - Theory and Methods 19, 2261-2279.
Cuadras CM (1989). Distance analysis in discrimination and classification using both continuous and categorical variables. In: Y. Dodge (ed.), Statistical Data Analysis and Inference. Amsterdam, The Netherlands: North-Holland Publishing Co., pp. 459-473.
dbplsr
for distance-based partial least squares.
#require(pls)
# prediction of new observations newdata
library(pls)
data(yarn)
## Default methods:
yarn.dbplsr <- dbplsr(density[1:27] ~ NIR[1:27,], data = yarn, ncomp=6, method="GCV")
pr_yarn_28 <- predict(yarn.dbplsr,newdata=t(as.matrix(yarn$NIR[28,])))
print(pr_yarn_28)
print(yarn$density[28])