pred.genv: Estimation or prediction for genv

Description Usage Arguments Details Value Examples

View source: R/pred.genv.R

Description

Perform estimation or prediction under the groupwise envelope model.

Usage

1
pred.genv(m, Xnew, Znew)

Arguments

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.

Details

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.

Value

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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

Renvlp documentation built on Sept. 11, 2021, 9:07 a.m.

Related to pred.genv in Renvlp...