Links
Archives
- 01/01/2003 - 02/01/2003
- 02/01/2003 - 03/01/2003
- 03/01/2003 - 04/01/2003
- 05/01/2003 - 06/01/2003
- 06/01/2003 - 07/01/2003
- 09/01/2003 - 10/01/2003
- 10/01/2003 - 11/01/2003
- 11/01/2003 - 12/01/2003
- 01/01/2004 - 02/01/2004
- 02/01/2004 - 03/01/2004
- 05/01/2004 - 06/01/2004
- 06/01/2004 - 07/01/2004
- 07/01/2004 - 08/01/2004
- 10/01/2004 - 11/01/2004
- 11/01/2004 - 12/01/2004
- 12/01/2004 - 01/01/2005
Notes on R statistics and programming language
Monday, January 12, 2004
Some good R functions:
names(object) reports all of the elements in the object. Useful as a reminder after lm to get all of the returned stuff.
vcov(lm.object) and hccm(lm.object) give the var-covar matrix and White's var covar matrix. Need to load library(car) to get hccm.
sqrt(diag(hccm(lm.object,type=hc1))) gives the same standard errors as comma robust in Stata.
Named vectors can be accessed by index:
sqrt(diag(hccm(lm.object,type=hc1))) ["myvar"]
Sweave is cool
names(object) reports all of the elements in the object. Useful as a reminder after lm to get all of the returned stuff.
vcov(lm.object) and hccm(lm.object) give the var-covar matrix and White's var covar matrix. Need to load library(car) to get hccm.
sqrt(diag(hccm(lm.object,type=hc1))) gives the same standard errors as comma robust in Stata.
Named vectors can be accessed by index:
sqrt(diag(hccm(lm.object,type=hc1))) ["myvar"]
Sweave is cool