Apologize for not being clearer earlier. I would like to ask again. Thank Joris and Markleeds for response. Two examples: 1. Function 'var'. In R, it is the sum of square divided by (n-1) but not by n. (I know this in R class) 2. Function 'lm'. In R, it is the residual sum of square divied by (n-2) not by n, the same as in the least squares estimate. But the assumption following that in the method of maximum likelihood. (I know this by looking up the book 'Introductory Statistics with R'). But not all functions are explained in the books. I am thinking whether there is a general way to figure out how R function works and what is the underlying theory besides looking at the codes (type var or lm at the Rprompt). Because R codes are too difficult to understand. Thanks Yi [[alternative HTML version deleted]]
Joris Meys
2010-Jun-23 00:34 UTC
[R] How to 'understand' R functions besides reading R codes
There is: 1) read the help files 2) read the vignette (see ?vignette ) 2) look up at www.rseek.org 3) check google 4) look at the references mentioned in the help files (or do first if you're not familiar with the method) 5) ask here If still nothing : use another function/method. Cheers Joris On Wed, Jun 23, 2010 at 2:29 AM, Yi <liuyi.feier at gmail.com> wrote:> Apologize for not being clearer earlier. I would like to ask again. Thank > Joris and Markleeds for response. > > Two examples: > > 1. Function 'var'. In R, it is the sum of square divided by (n-1) but not by > n. (I know this in R class) > > 2. Function 'lm'. In R, it is the residual sum of square divied by (n-2) not > by n, the same as in the least squares estimate. But the assumption > following that in the method of maximum likelihood. ?(I know this by looking > up the book 'Introductory Statistics with R'). > > But not all functions are explained in the books. > > I am thinking whether there is a general way to figure out how R function > works and what is the underlying theory besides looking at the codes > (type var or lm at the ?Rprompt). Because R codes are too difficult to > understand. > > Thanks > > Yi > > ? ? ? ?[[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. >-- Joris Meys Statistical consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control tel : +32 9 264 59 87 Joris.Meys at Ugent.be ------------------------------- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
Maybe Matching Threads
- count data with a specific range
- Verify the linear regression model used in R ( fundamental theory)
- How to calculate the robust standard error of the dependent variable
- All a column to a data frame with a specific condition
- How to predict the mean and variance of the dependent variable after regression