Re: [R] Tobit Estimation with Panel Data

From: Arne Henningsen <>
Date: Fri, 04 Jul 2008 04:00:05 +0200

On Wednesday 02 July 2008 16:52:41 Arne Henningsen wrote:
> Hi all!
> Do you know if there is any R function/package that can be used to
> estimate "tobit" models with panel data (e.g. with random individual
> effects)?
> In economics, a "tobit" model is a model with a dependent variable that is
> left-censored at zero. Hence, it is a special case of a survival model and
> can be estimated using the "survival" package (see e.g. [1]). However, as
> far as I know, this package cannot account for a panel structure of the
> data (i.e. data with two dimensions: usually time and individuals).
> [1]

On Thursday 03 July 2008 14:27:30 Terry Therneau wrote:
> Adding true random effects to survreg is certainly on my list of useful
> additions, but one with no start date in sight. That said, one can get
> an alternate solution with
> survreg(Surv(time, status) ~ x1 + x2 + frailty.gaussian(id,
> method='aic'))
> Justification: one can view a random effects model as a penalized
> model, that is, as
> a. the addition of "factor(id)" - a coefficient b_i for each subject
> b. a shrinkage penalty, -.5*k* sum(b_i^2), is added to the log-lik,
> and we minimize the sum
> c. the value of k is chosen to maximize an integrated likelihood, one
> with the b's integrated out. 1/k is the variance of the random effect
> The above code uses the AIC to choose k. You could also use a
> user-specified degrees of freedom.
> WARNING: Using "method='reml'" in the above won't work correctly. The
> fact that no warning is given in this case is serious flaw in the
> survival package. (In my defense, the 'penalty function' code for coxph
> and survreg was designed to allow general user-written penalties; a side
> effect is that the penalty functions can't easily tell which routine is
> calling them. Most, e.g., pspline() and ridge(), work for both coxph and
> survreg. But frailty with either an 'ml' or 'reml' argument computes the
> appropriate Cox model integral, not the survreg one, and so gives
> nonsense answers when used with survreg.)

Thanks, Terry, for your detailed answer. I will try this. I did not figure out yet, whether the "bayesSurv" [1] or the "JM" [2] package can be used to estimate tobit models with panel data. Any hints are welcome?

[1] [2]

Thanks in advance,


______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 04 Jul 2008 - 02:03:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 04 Jul 2008 - 03:32:06 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive