Daniel Brewer
2009-Dec-23 10:28 UTC
[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.brewer at 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}}
ONKELINX, Thierry
2009-Dec-23 11:00 UTC
[R] COnfidence intervals for estimates of linear model
Dear Daniel, Have a look at ?predict.lm The interval argument gives you the information that you need. HTH, Thierry ------------------------------------------------------------------------ ---- ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek team Biometrie & Kwaliteitszorg Gaverstraat 4 9500 Geraardsbergen Belgium Research Institute for Nature and Forest team Biometrics & Quality Assurance Gaverstraat 4 9500 Geraardsbergen Belgium tel. + 32 54/436 185 Thierry.Onkelinx at inbo.be www.inbo.be To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher The plural of anecdote is not data. ~ Roger Brinner The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey -----Oorspronkelijk bericht----- Van: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Namens Daniel Brewer Verzonden: woensdag 23 december 2009 11:28 Aan: r-help at stat.math.ethz.ch Onderwerp: [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.brewer at 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 at 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. Druk dit bericht a.u.b. niet onnodig af. Please do not print this message unnecessarily. Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is door een geldig ondertekend document. The views expressed in this message and any annex are purely those of the writer and may not be regarded as stating an official position of INBO, as long as the message is not confirmed by a duly signed document.
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.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Daniel Brewer > Sent: Wednesday, December 23, 2009 3:28 AM > To: r-help at 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.brewer at 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 at 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.