pred.pois.env: Estimation or prediction for pois.env

View source: R/pred.pois.env.R

pred.pois.envR Documentation

Estimation or prediction for pois.env

Description

Perform estimation or prediction under the envelope model in poisson regression.

Usage

pred.pois.env(m, Xnew)

Arguments

m

A list containing estimators and other statistics inherited from xenv.

Xnew

The value of X with which to estimate or predict Y. A p dimensional vector.

Details

This function evaluates the envelope in poisson regression at new value Xnew. It can perform estimation: find the fitted value when X = Xnew, or prediction: predict Y when X = Xnew. The covariance matrix of estimation and the standard errors of estimation are also provided.

Value

The output is a list that contains following components.

value

The fitted value or the predicted value evaluated at Xnew.

covMatrix.estm

The covariance matrix of the fitted value at Xnew.

SE.estm

The standard error of the fitted value at Xnew.

Examples

data(horseshoecrab)
X1 <- as.numeric(horseshoecrab[ , 1] == 2)
X2 <- as.numeric(horseshoecrab[ , 1] == 3)
X3 <- as.numeric(horseshoecrab[ , 1] == 4)
X4 <- as.numeric(horseshoecrab[ , 2] == 2)
X5 <- as.numeric(horseshoecrab[ , 2] == 3)
X6 <- horseshoecrab[ , 3]
X7 <- horseshoecrab[ , 5]
X <- cbind(X1, X2, X3, X4, X5, X6, X7)
Y <- horseshoecrab[ , 4]

m <- pois.env(X, Y, 1)

pred.res <- pred.pois.env(m, X[1, ])
pred.res


Renvlp documentation built on Oct. 11, 2023, 1:06 a.m.

Related to pred.pois.env in Renvlp...