pred.genv: Estimation or prediction for genv

View source: R/pred.genv.R

pred.genvR Documentation

Estimation or prediction for genv

Description

Perform estimation or prediction under the groupwise envelope model.

Usage

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

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 Oct. 11, 2023, 1:06 a.m.

Related to pred.genv in Renvlp...