Last data update: 2014.03.03

R: Tobit Regression
tobitR Documentation

Tobit Regression

Description

Fitting and testing tobit regression models for censored data.

Usage

  tobit(formula, left = 0, right = Inf, dist = "gaussian",
    subset = NULL, data = list(), ...)

Arguments

formula

a symbolic description of a regression model of type y ~ x1 + x2 + ....

left

left limit for the censored dependent variable y. If set to -Inf, y is assumed not to be left-censored.

right

right limit for the censored dependent variable y. If set to Inf, the default, y is assumed not to be right-censored.

dist

assumed distribution for the dependent variable y. This is passed to survreg, see the respective man page for more details.

subset

a specification of the rows to be used.

data

a data frame containing the variables in the model.

...

further arguments passed to survreg.

Details

The function tobit is a convenience interface to survreg (for survival regression, including censored regression) setting different defaults and providing a more convenient interface for specification of the censoring information.

The default is the classical tobit model (Tobin 1958, Greene 2003) assuming a normal distribution for the dependent variable with left-censoring at 0.

Technically, the formula of type y ~ x1 + x2 + ... passed to tobit is simply transformed into a formula suitable for survreg: This means the dependent variable is first censored and then wrapped into a Surv object containing the censoring information which is subsequently passed to survreg, e.g., Surv(ifelse(y <= 0, 0, y), y > 0, type = "left") ~ x1 + x2 + ... for the default settings.

Value

An object of class "tobit" inheriting from class "survreg".

References

Greene, W.H. (2003). Econometric Analysis, 5th edition. Upper Saddle River, NJ: Prentice Hall.

Tobin, J. (1958). Estimation of Relationships for Limited Dependent Variables. Econometrica, 26, 24–36.

Examples

data("Affairs")

## from Table 22.4 in Greene (2003)
fm.tobit <- tobit(affairs ~ age + yearsmarried + religiousness + occupation + rating,
  data = Affairs)
fm.tobit2 <- tobit(affairs ~ age + yearsmarried + religiousness + occupation + rating,
  right = 4, data = Affairs)

summary(fm.tobit)
summary(fm.tobit2)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(AER)
Loading required package: car
Loading required package: lmtest
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

Loading required package: sandwich
Loading required package: survival
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/AER/tobit.Rd_%03d_medium.png", width=480, height=480)
> ### Name: tobit
> ### Title: Tobit Regression
> ### Aliases: tobit print.tobit summary.tobit print.summary.tobit
> ###   formula.tobit model.frame.tobit update.tobit waldtest.tobit
> ###   lrtest.tobit linearHypothesis.tobit deviance.survreg fitted.survreg
> ###   nobs.survreg weights.survreg
> ### Keywords: regression
> 
> ### ** Examples
> 
> data("Affairs")
> 
> ## from Table 22.4 in Greene (2003)
> fm.tobit <- tobit(affairs ~ age + yearsmarried + religiousness + occupation + rating,
+   data = Affairs)
> fm.tobit2 <- tobit(affairs ~ age + yearsmarried + religiousness + occupation + rating,
+   right = 4, data = Affairs)
> 
> summary(fm.tobit)

Call:
tobit(formula = affairs ~ age + yearsmarried + religiousness + 
    occupation + rating, data = Affairs)

Observations:
         Total  Left-censored     Uncensored Right-censored 
           601            451            150              0 

Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
(Intercept)    8.17420    2.74145   2.982  0.00287 ** 
age           -0.17933    0.07909  -2.267  0.02337 *  
yearsmarried   0.55414    0.13452   4.119 3.80e-05 ***
religiousness -1.68622    0.40375  -4.176 2.96e-05 ***
occupation     0.32605    0.25442   1.282  0.20001    
rating        -2.28497    0.40783  -5.603 2.11e-08 ***
Log(scale)     2.10986    0.06710  31.444  < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Scale: 8.247 

Gaussian distribution
Number of Newton-Raphson Iterations: 4 
Log-likelihood: -705.6 on 7 Df
Wald-statistic: 67.71 on 5 Df, p-value: 3.0718e-13 

> summary(fm.tobit2)

Call:
tobit(formula = affairs ~ age + yearsmarried + religiousness + 
    occupation + rating, right = 4, data = Affairs)

Observations:
         Total  Left-censored     Uncensored Right-censored 
           601            451             70             80 

Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
(Intercept)    7.90098    2.80385   2.818 0.004834 ** 
age           -0.17760    0.07991  -2.223 0.026244 *  
yearsmarried   0.53230    0.14117   3.771 0.000163 ***
religiousness -1.61634    0.42440  -3.809 0.000140 ***
occupation     0.32419    0.25388   1.277 0.201624    
rating        -2.20701    0.44983  -4.906 9.28e-07 ***
Log(scale)     2.07232    0.11040  18.772  < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Scale: 7.943 

Gaussian distribution
Number of Newton-Raphson Iterations: 4 
Log-likelihood:  -500 on 7 Df
Wald-statistic: 42.56 on 5 Df, p-value: 4.5387e-08 

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>