View source: R/weighted.pred.env.R
weighted.pred.env | R Documentation |
Perform estimation or prediction through weighted partial envelope model.
weighted.pred.env(X, Y, Xnew)
X |
Predictors. An n by p matrix, p is the number of predictors. The predictors can be univariate or multivariate, discrete or continuous. |
Y |
Multivariate responses. An n by r matrix, r is the number of responses and n is number of observations. The responses must be continuous variables. |
Xnew |
The value of X with which to estimate or predict Y. A p dimensional vector. |
This function evaluates the envelope model at new value Xnew. It can perform estimation: find the fitted value when X = Xnew, or prediction: predict Y when X = Xnew. But it does not provide the estimation or prediction error. This function performs prediction using the same procedure as in pred2.env, except that the partial envelope estimator with dimension u is replaced by a weighted partial envelope estimator. The weights are decided based on BIC values.
value |
The fitted value or the predicted value evaluated at Xnew. |
data(fiberpaper)
X <- fiberpaper[, 5:7]
Y <- fiberpaper[, 1:4]
## Not run: pred.res <- weighted.pred.env(X, Y, X[10, ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.