Re: [R] accessing confidence interval values from the 'predict' function

2015-08-10 Thread Adams, Jean
Avril, The more direct way to access these columns from the matrix is: ci[, "lwr"] ci[, "upr"] Jean On Mon, Aug 10, 2015 at 3:20 AM, alc wrote: > > > Dear all, > > I'm wondering how can I access the confidence interval values ('upr' and > 'lwr' values) produced by the 'predict' function. For

Re: [R] accessing confidence interval values from the 'predict' function

2015-08-10 Thread Michael Dewey
Dear Avril I think you will find that predict.lm returns a matrix not a data frame. I find str() useful when R does things I did not expect or quite understand. Michael On 10/08/2015 09:20, alc wrote: Dear all, I'm wondering how can I access the confidence interval values ('upr' and 'lwr'

[R] accessing confidence interval values from the 'predict' function

2015-08-10 Thread alc
Dear all, I'm wondering how can I access the confidence interval values ('upr' and 'lwr' values) produced by the 'predict' function. For example, I fitted a linear regression line using: fit <- lm(y ~ x) I then wanted to calculate a 95% confidence interval for the line, and did this using