R Programming/Index
This page provides tables which make it easy to find functions for usual tasks in statistics in R, SAS and Stata. Other software may also be included in the future such as SPSS.
Data management
| Function |
R |
Stata |
SAS |
|---|
| Merge |
merge() |
merge / mmerge |
- |
| Reshape |
reshape() |
reshape |
- |
| Expand a dataset |
expand() (epicalc) |
expand |
- |
↑Jump back a sectionDescriptive Statistics
| Function |
R |
Stata |
SAS |
|---|
| Mean |
mean() |
mean |
proc means |
| Histogram |
hist() |
hist |
- |
| Frequency table |
table() |
ta |
proc freq |
↑Jump back a sectionRegression models
| Function |
R |
Stata |
SAS |
|---|
| Least Square |
lm() |
reg |
proc reg |
| GLM |
glm() |
glm |
proc glm |
| Probit models |
glm(, family = binomial(link="probit")) |
probit |
- |
| Probit models |
glm(, family = binomial(link="logit")) |
logit |
- |
| Linear fixed effects model |
plm( , model = "within") (plm) |
xtreg , fe |
- |
| Linear random effects model |
plm( , model = "random") (plm) |
xtreg , re |
- |
| Linear quantile regression |
rq() (quantreg) |
qreg |
- |
| Ordinal logistic regression |
polr() (MASS) |
ologit |
- |
| Linear IV (2sls) |
ivreg() (AER) |
ivreg |
proc syslin (2sls) - |
↑Jump back a section Last modified on 21 June 2011, at 12:20