Using 1.95996 is appropriate when you know the population standard deviation or 
the sample size is approximately infinity.  Otherwise you should use the 
t-distribution, the qt function is useful for that.

Or if you want intervals for the coefficients look at the confint function, if 
you want intervals for predictions, then look at predict.lm as has been pointed 
out (estimates could be interpreted either way).

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111


> -----Original Message-----
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of Daniel Brewer
> Sent: Wednesday, December 23, 2009 3:28 AM
> To: r-h...@stat.math.ethz.ch
> Subject: [R] COnfidence intervals for estimates of linear model
> 
> Hello,
> 
> I would like to calculate the 95% confidence intervals for the
> estimates
> of a linear model and I just wanted to check that I am doing it
> correct.
>  Is it just:
> 
> Estimate + 1.95996*Std.Error to Estimate - 1.95996*Std.Error
> 
> or is there another approach that doesn't assume a normal distrbution?
> 
> Thanks.  Apologies for my naiivity
> 
> Dan
> 
> --
> **************************************************************
> Daniel Brewer, Ph.D.
> 
> Institute of Cancer Research
> Molecular Carcinogenesis
> Email: daniel.bre...@icr.ac.uk
> **************************************************************
> 
> The Institute of Cancer Research: Royal Cancer Hospital, a charitable
> Company Limited by Guarantee, Registered in England under Company No.
> 534147 with its Registered Office at 123 Old Brompton Road, London SW7
> 3RP.
> 
> This e-mail message is confidential and for use by the
> a...{{dropped:2}}
> 
> ______________________________________________
> 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.

______________________________________________
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.

Reply via email to