[R] Tobit Estimation with Panel Data
Arne Henningsen
arne.henningsen at googlemail.com
Fri Jul 4 04:00:05 CEST 2008
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] http://finzi.psych.upenn.edu/R/Rhelp02a/archive/121253.html
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] http://cran.r-project.org/web/packages/bayesSurv/index.html
[2] http://cran.r-project.org/web/packages/JM/index.html
Thanks in advance,
Arne
--
http://www.arne-henningsen.name
More information about the R-help
mailing list