Re: [R] plot out the predicted values and the upper and lower limits

2014-02-26 Thread MacQueen, Don
When in doubt, first consult the included online help. ?predict.lm Offers this example, which seems to meet the request x <- rnorm(15) y <- x + rnorm(15) predict(lm(y ~ x)) new <- data.frame(x = seq(-3, 3, 0.5)) predict(lm(y ~ x), new, se.fit = TRUE) pred.w.plim <- predict(lm(y ~ x), new, int

Re: [R] plot out the predicted values and the upper and lower limits

2014-02-26 Thread Rolf Turner
On 27/02/14 05:43, varin sacha wrote: 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

Re: [R] plot out the predicted values and the upper and lower limits

2014-02-26 Thread varin sacha
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 re

Re: [R] plot out the predicted values and the upper and lower limits

2014-02-25 Thread Rolf Turner
On 26/02/14 11:57, varin sacha wrote: 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

[R] plot out the predicted values and the upper and lower limits

2014-02-25 Thread varin sacha
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 : Theoretica