For adventurous, but skeptical souls who lack faith in the usual Gaussian tobit assumptions, I could mention that there is new "fcen" method for the quantreg rq() function that implements Powell's tobit estimator using an algorithm of Bernd Fitzenberger.
url: www.econ.uiuc.edu/~roger Roger Koenker email [EMAIL PROTECTED] Department of Economics vox: 217-333-4558 University of Illinois fax: 217-244-6678 Champaign, IL 61820 On Jan 19, 2006, at 6:04 AM, Achim Zeileis wrote: > On Thu, 19 Jan 2006 14:05:58 +0530 Ajay Narottam Shah wrote: > >> Folks, >> >> Based on >> http://www.biostat.wustl.edu/archives/html/s-news/1999-06/ >> msg00125.html >> >> I thought I should experiment with using survreg() to estimate tobit >> models. > > I've been working on a convenience interface to survreg() that > makes it > particularly easy to fit tobit models re-using the survreg() > infrastructure. The package containing the code will hopefully be > release soon - anyone who wants a devel snapshot, please contact me > off-list. > Ajay, I'll send you the code in a separate mail. > > Best, > Z > >> I start by simulating a data frame with 100 observations from a tobit >> model >> >>> x1 <- runif(100) >>> x2 <- runif(100)*3 >>> ystar <- 2 + 3*x1 - 4*x2 + rnorm(100)*2 >>> y <- ystar >>> censored <- ystar <= 0 >>> y[censored] <- 0 >>> D <- data.frame(y, x1, x2) >>> head(D) >> y x1 x2 >> 1 0.0000000 0.86848630 2.6275703 >> 2 0.0000000 0.88675832 1.7199261 >> 3 2.7559349 0.38341782 0.6247869 >> 4 0.0000000 0.02679007 2.4617981 >> 5 2.2634588 0.96974450 0.4345950 >> 6 0.6563741 0.92623096 2.4983289 >> >>> # Estimate it >>> library(survival) >>> tfit <- survreg(Surv(y, y>0, type='left') ~ x1 + x2, >> data=D, dist='gaussian', link='identity') >> >> It says: >> >> Error in survreg.control(...) : unused argument(s) (link ...) >> Execution halted >> >> My competence on library(survival) is zero. Is it still the case that >> it's possible to be clever and estimate the tobit model using >> library(survival)? >> >> I also saw the two-equation setup in the micEcon library. I haven't >> yet understood when I would use that and when I would use a straight >> estimation of a censored regression by MLE. Can someone shed light on >> that? My situation is: Foreign investment on the Indian stock >> market. Lots of firms have zero foreign investment. But many do have >> foreign investment. I thought this is a natural tobit situation. >> >> -- >> Ajay Shah >> http://www.mayin.org/ajayshah >> [EMAIL PROTECTED] >> http://ajayshahblog.blogspot.com <*(:-? - wizard who doesn't know the >> answer. >> >> ______________________________________________ >> [email protected] mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide! >> http://www.R-project.org/posting-guide.html >> > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting- > guide.html ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
