Description Usage Arguments Details Value See Also Examples
Predict a mht or mht.order object for new data newx
1 2 3 4 |
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)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.