predict.asm | R Documentation |
asm
regression model.Outputs predictions on new test data based on a fitted asm
regression model. Also returns a confidence interval around
the conditional mean (if interval = "confidence") or predicted response (if interval = "prediction").
## S3 method for class 'asm'
predict(object, newdata = NULL, interval = "none", level = 0.95, ...)
object |
asm object |
newdata |
new data frame |
interval |
type of interval calculation, either "none", "confidence" or "prediction". Default is "none". |
level |
confidence level |
... |
additional arguments to ensure compatibility with the generic function predict() |
matrix of predicted values * if interval = "none", the matrix has one column of predicted values * if interval = "confidence" or "prediction", the matrix has three columns: predicted value, lower bound, and upper bound
model = asm(mpg ~ cyl + hp + disp, data=mtcars)
predict(model, newdata = data.frame(cyl = 4, hp = 121, disp = 80), interval = "prediction")
n <- 1000
X <- rnorm(n)
beta <- 2
Y <- beta*X + rt(n,df=3)
Mod <- asm(Y ~ X)
predict(Mod, newdata = data.frame(X = 1), interval = "prediction")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.