Learn R Programming

VGAM (version 0.8-2)

tobit: Tobit Model

Description

Fits a Tobit model to a univariate response.

Usage

tobit(Lower = 0, Upper = Inf, lmu = "identity", lsd = "loge",
      emu = list(), esd = list(), method.init = 1, zero = 2)

Arguments

Lower
Numeric of length 1, it is the value $L$ described below. Any value of the linear model $x_i^T \beta$ that is less than this value is assigned this value. Hence this should be the smallest possible value in the response variable.
Upper
Numeric of length 1, it is the value $U$ described below. Any value of the linear model $x_i^T \beta$ that is greater than this value is assigned this value. Hence this should be the largest possible value in the response variable.
lmu, lsd
Parameter link functions applied to the mean and standard deviation parameters. See Links for more choices. The standard deviation is a positive quantity, therefore a log link is its default.
emu, esd
List. Extra argument for each of the links. See earg in Links for general information.
method.init
Initialization method. Either 1 or 2, this specifies two methods for obtaining initial values for the parameters.
zero
An integer vector, containing the value 1 or 2. If so, the mean or standard deviation respectively are modelled as an intercept only. Setting zero = NULL means both linear/additive predictors are modelled as functions of the explanatory

Value

  • An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm, and vgam.

Details

The Tobit model can be written $$y_i^* = x_i^T \beta + \varepsilon_i$$ where the $e_i \sim N(0,\sigma^2)$ independently and $i=1,\ldots,n$. However, we measure $y_i = y_i^*$ only if $y_i^* > L$ and $y_i^* < U$ for some cutpoints $L$ and $U$. Otherwise we let $y_i=L$ or $y_i=U$, whatever is closer. The Tobit model is thus a multiple linear regression but with censored responses if it is below or above certain cutpoints.

The defaults for Lower and Upper correspond to the classical Tobit model. By default, the mean $x_i^T \beta$ is the first linear/additive predictor, and the log of the standard deviation is the second linear/additive predictor. The Fisher information matrix for uncensored data is diagonal. The fitted values are the estimates of $x_i^T \beta$.

References

Tobin, J. (1958) Estimation of relationships for limited dependent variables. Econometrica 26, 24--36.

See Also

normal1, cnormal1. dcnormal1.

Examples

Run this code
tdata = data.frame(x = seq(-1, 1, len = (nn <- 1000)))
foo = function(x) 1 + 4*x
tdata = transform(tdata, ystar = foo(x) + rnorm(nn))
Lower = 1; Upper = 4
tdata = transform(tdata, y = pmax(ystar, Lower))
tdata = transform(tdata, y = pmin(y, Upper))
with(tdata, table(y == Lower | y == Upper)) # How many censored values?

fit = vglm(y ~ x, tobit(Lower = Lower, Upper = Upper), tdata, trace = TRUE)
table(fit@extra$censoredL)
table(fit@extra$censoredU)
coef(fit, matrix = TRUE)
summary(fit)
with(tdata, plot(x, y, main = "Tobit model", las=1))
legend(-0.9, 3, c("Truth", "Estimate"), col=c("blue", "red"), lwd=2)
with(tdata, lines(x, foo(x), col="blue", lwd=2))
with(tdata, lines(x, fitted(fit), col="red", lwd=2, lty="dashed"))

Run the code above in your browser using DataLab