Many thanks Rolf, These codes below are ok : LinearModel.1 <- lm(GDP.per.head ~ Competitivness.score + Quality.score, data=Dataset) summary(LinearModel.1)
predict(LinearModel.1, se.fit = FALSE, scale = NULL, df = Inf,interval = c("prediction"),level = 0.95, type = c("response")) One problem remains : If I want to plot out (in a same graph) the predicted values as well as the upper and lower limits of the prediction intervals for those values. How can I do, many thanks once more. Best, Le Mercredi 26 février 2014 4h59, varin sacha <varinsa...@yahoo.fr> a écrit : Hi, I have realized a multiple linear regression. To know how well my model does in terms of prediction, I can compute prediction intervals bands and decide if they are narrow enough to be of use. If they are too wide, then they probably are not useful. So what I am trying to do is : Theoretically I know that I can use the "predict" command in R to generate the prediction interval for a set of points. The idea is to find the linear regression using the lm command. Then I can use the predict command to get the prediction interval for a set of points in the domain. Then I plot out the predicted values as well as the upper and lower limits of the prediction intervals for those values. My problem is to practice what I theoretically know, especially using R. My linear model is the following : LinearModel.1 <- lm(GDP.per.head ~ Competitivness.score + Quality.score, data=Dataset) summary(LinearModel.1) predict(LinearModel.1, se.fit = FALSE, scale = NULL, df = Inf,interval = c("none", "confidence", "prediction"),level = 0.95, type = c("response", "terms"),terms = NULL) Could you please help me with my R codes ? Thanks for your precious help, [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.