I want to compute a 90% confidence interval for a mean response at a specific x value, and a 90% prediction interval for the individual response at that same X value. The way I know how to do this in R is by using the predict() function, but this function create 95% intervals, and I want 90%. How do I do this?
How to use predict() function to compute confidence and prediction intervals other than 95%? [closed]
For a linear regression model, in
level = 0.95 just replace 0.95 by 0.90. Below I'm reporting the help of
predict in the case of an object of class
## S3 method for class 'lm' predict(object, newdata, se.fit = FALSE, scale = NULL, df = Inf, interval = c("none", "confidence", "prediction"), level = 0.95, type = c("response", "terms"), terms = NULL, na.action = na.pass, pred.var = res.var/weights, weights = 1, ...)