R vs SAS Tobit Regression
Tobit Regression Comparison
The following table shows the tobit regression analysis, the capabilities of each language, and whether or not the results from each language match.
Analysis | Supported in R | Supported in SAS | Results Match | Notes |
---|---|---|---|---|
Tobit Regression (normal distributed data assumption) | Yes | Yes | Yes | The results from censReg::censReg and survival::survreg match the SAS PROC LIFEREG results |
Comparison Results
Normally distributed data assumption
Here is a table of comparison values between the R functions censReg::censReg
, survival::survreg
, VGAM::vglm
, and SAS PROC LIFEREG
for the dataset used. The statistics around the treatment effect (difference between group A and B, B-A) are provided. Further we also present the estimate of \(\sigma\). All numbers are rounded to 4 digits
Statistic | censReg() | survreg() | vglm() | LIFEREG | Match | Notes |
---|---|---|---|---|---|---|
Treatment effect | 1.8225 | 1.8225 | 1.8226 | 1.8225 | Yes | see below |
Standard error | 0.8061 | 0.8061 | 0.7942 | 0.8061 | Yes | see below |
p-value | 0.0238 | 0.0238 | 0.0217 | 0.0238 | Yes | see below |
95% CI (Wald based) | 0.2427 ; 3.4024 | 0.2427 ; 3.4024 | 0.2661 ; 3.3791 | 0.2427 ; 3.4024 | Yes | see below |
\(\sigma\) | 1.7316 | 1.7316 | 1.7317 | 1.7316 | Yes | see below |
Note: The results of VGAM::vglm()
are slightly different since an iteratively reweighted least squares (IRLS) algorithm is used for estimation.
Note: one-sided p-values
Using SAS PROC LIFEREG
, one-sided p-values can be easily obtained by adding UPPER
(in the presented data example this corresponds with \(H_1: \mu_B>\mu_A\)) or LOWER
(this corresponds with \(H_1: \mu_B<\mu_A\)) in the estimate
statement. In the presented data example, the obtained p-values are:
UPPER
: \(p_{one-sided} = 0.0119\)LOWER
: \(p_{one-sided} = 0.9881\)
Using R, no option is available with censReg::censReg
or survival::survreg
to directly obtain the one-sided p-values. However, the one-sided p-values can be easily calculated. For example, for a right one-sided p-value (in the presented data example this corresponds with \(H_1: \mu_B>\mu_A\)) the following rules need to be followed:
If the estimate \(\mu_B - \mu_A \geq 0\), then \(p_{one-sided} = p_{two-sided}/2\)
If the estimate \(\mu_B - \mu_A < 0\), then \(p_{one-sided} = 1 - (p_{two-sided}/2)\)
For a left one-sided p-value this should be done the other way around. Applying this rule to the results obtained in R, gives similar one-sided p-values as SAS for the presented data example.
Summary and Recommendation
Comparison between SAS PROC LIFEREG
and R functions censReg::censReg
and survival::survreg
show identical results for the dataset tried.
Historically and typically the Tobit model is based on the assumption of normal distributed data. Within SAS PROC LIFEREG
and R survival::survreg
multiple other different distributional assumption are possible. These include weibull, exponential, gaussian, logistic, lognormal and loglogistic for survival::survreg
. These include EXPONENTIAL, GAMMA, LLOGISTIC, LOGISTIC, LOGNORMAL, NORMAL, WEIBULL for PROC LIFEREG
.
References
Breen, R. (1996). Regression models. SAGE Publications, Inc., https://doi.org/10.4135/9781412985611
Tobin, James (1958). “Estimation of Relationships for Limited Dependent Variables”. Econometrica. 26 (1): 24-36. doi:10.2307/1907382