Can someone direct me to a resource or resources that list the formulae used by R functions (i.e. predict.lm ) to calculate the statistic reported. I am not a programmer and studying the r code is extremely slow going. I have searched r-project.org and all the function help files without success. For example I have attempted to replicate by hand the se.fit calculation from a lm object calculated by a call to the predict function and have not been able to reproduce the results. Thanks, Richard Saba Department of Economics Auburn University Email: sabaric@auburn.edu [[alternative HTML version deleted]]
Richard: Assuming that you have installed R and are not trying to find everything on the website, you can list the code of any function by just typing the function name and <enter> You will necessarily have to read the R code, but that is much easier than it may seem when you look at a couple pages of it, as you will when you list predict.lm Best wishes. Charles Annis, P.E. Charles.Annis at StatisticalEngineering.com phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Richard Saba Sent: Tuesday, February 12, 2008 8:36 AM To: r-help at r-project.org Subject: [R] Formulae for R functions Can someone direct me to a resource or resources that list the formulae used by R functions (i.e. predict.lm ) to calculate the statistic reported. I am not a programmer and studying the r code is extremely slow going. I have searched r-project.org and all the function help files without success. For example I have attempted to replicate by hand the se.fit calculation from a lm object calculated by a call to the predict function and have not been able to reproduce the results. Thanks, Richard Saba Department of Economics Auburn University Email: sabaric at auburn.edu [[alternative HTML version deleted]] ______________________________________________ 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.
> Can someone direct me to a resource or resources that list the formulae used > by R functions (i.e. predict.lm ) to calculate the statistic reported. I > am not a programmer and studying the r code is extremely slow going. I > have searched r-project.org and all the function help files without > success. For example I have attempted to replicate by hand the se.fit > calculation from a lm object calculated by a call to the predict function > and have not been able to reproduce the results.The information you want is not readily available for most functions in R. The standard documentation files are, by tradition, very short synopses of the arguments. For a few of the larger packages such as linear mixed models (lme) and the survival code, the authors have written a book: when it exists this is your best bet for a comprensive methods description. Many details can be found in the excellent Venables and Ripley text, which is often the first place I look. For your question, the standard statistical formulae are quite well established, R will of course use them. If you are reduced to reading source code, make sure you fetch it off of the R site, rather than printing out the R internal code, which has been stripped of all comments. Terry Therneau