predict.mcen {mcen} | R Documentation |
predictions from a mcen model
Description
predictions from a mcen model
Usage
## S3 method for class 'mcen'
predict(object, newx, ...)
Arguments
object |
The mcen object. |
newx |
A matrix of new observations. |
... |
Additional variables to be sent to predict. |
Value
Returns predictions for each beta of an mcen object
Author(s)
Ben Sherwood <ben.sherwood@ku.edu>, Brad Price <brad.price@mail.wvu.edu>
Examples
x <- matrix(rnorm(400),ncol=4)
beta <- beta <- matrix(c(1,1,0,0,0,0,-1,-1,0,0,-1,-1,1,1,0,0),ncol=4)
y <- x%*%beta + rnorm(400)
mcen_fit <- mcen(x,y,ky=2,delta=1)
new_x <- matrix(rnorm(12),ncol=4)
mcen_preds <- predict(mcen_fit, new_x)
[Package mcen version 1.2.1 Index]