David,
   
  Thanks for the quick reply. 
  Just confirming, does predict(s.lm,data.frame(x=30000),interval="prediction") 
gives prediction interval or tolerance interval?
   
  Thanks
  Sachin

David Barron <[EMAIL PROTECTED]> wrote:
  > predict(s.lm,data.frame(x=30000),interval="prediction")
          fit      lwr      upr
[1,] 16073985 -9981352 42129323
> predict(s.lm,data.frame(x=30000),interval="confidence")
          fit     lwr      upr 
[1,] 16073985 5978125 26169846


  On 15/09/06, Sachin J <[EMAIL PROTECTED]> wrote:  Hi,

  1. How do I construct 95% prediction interval for new x values, for example - 
x = 30000?
  2. How do I construct 95% confidence interval?

  my dataframe is as follows :

  >dt

  structure(list(y = c(26100000, 
60500000, 16200000, 30700000, 70100000, 57700000, 46700000, 8600000,
10000000, 61800000, 30200000, 52200000, 71900000, 55000000, 12700000
), x = c(108000, 136000, 35000,
77000, 178000, 150000, 126000, 24000, 28000, 214000, 108000, 
190000, 308000, 252000, 71000)), .Names = c("y",
"x"), class = "data.frame", row.names = c("1",
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15"))

  my regression eqn is as below:

  > s.lm <- lm(y ~ x)

  Thanks in advance.


---------------------------------

        [[alternative HTML version deleted]] 

______________________________________________
[email protected] 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.




-- 
=================================
David Barron
Said Business School
University of Oxford
Park End Street
Oxford OX1 1HP 

                
---------------------------------


        [[alternative HTML version deleted]]

______________________________________________
[email protected] 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.

Reply via email to