pred.genv | R Documentation |
Perform estimation or prediction under the groupwise envelope model.
pred.genv(m, Xnew, Znew)
m |
A list containing estimators and other statistics inherited from env. |
Xnew |
The value of X with which to estimate or predict Y. A p dimensional vector. |
Znew |
A group indicator of X. |
This function evaluates the envelope model at new value Xnew. It can perform estimation: find the fitted value when X = Xnew with a group indicator Z = Znew, or prediction: predict Y when X = Xnew with a group indicator Z = Znew. The covariance matrix and the standard errors are also provided.
The output is a list that contains following components.
value |
The fitted value or the predicted value evaluated at Znew. |
covMatrix.estm |
The covariance matrix of the fitted value at Znew. |
SE.estm |
The standard error of the fitted value at Znew. |
covMatrix.pred |
The covariance matrix of the predicted value at Znew. |
SE.pred |
The standard error of the predicted value at Znew. |
data(fiberpaper)
X <- fiberpaper[ , c(5, 7)]
Y <- fiberpaper[ , 1:3]
Z <- as.numeric(fiberpaper[ , 6] > mean(fiberpaper[ , 6]))
u <- u.genv(X, Y, Z)
u
m <- genv(X, Y, Z, 2)
m
X <- as.matrix(X)
pred.res <- pred.genv(m, X[2, ], Z[2])
pred.res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.