predict {mht} | R Documentation |
mht
or mht.order
objectPredict a mht
or mht.order
object for new data newx
## S3 method for class 'mht' predict(object,newx,level,...) ## S3 method for class 'mht.order' predict(object,newx,level,...)
object |
Object of class "mht.order" as obtained from |
newx |
Data matrix of size n*p. |
level |
Level of the prediction interval. Default is 0.95. |
... |
not used. |
The prediction is available for each level alpha
of the object. The prediction values and the prediction interval are derived from the predict.lm
function. If newx
is missing, the fitted values of the object are returned.
Array of predicted values and prediction interval. The third dimension is relative to the type I error alpha -from the initial object-. For each alpha, a matrix with column names fit, lwr, and upr (from predict.lm
)
## Not run: x=matrix(rnorm(100*20),100,20) beta=c(rep(2,5),rep(0,15)) y=x%*%beta+rnorm(100) # mht mod=mht(x,y,alpha=c(0.1,0.05),maxordre=15) # predict without new data: gives the fitted values pred=predict(mod) # predict with new data pred=predict(mod,newx=matrix(rnorm(40*20),40,20)) pred ## End(Not run)