Yongfu He
2008-Jan-13 07:36 UTC
[R] How to fit a Tobit model with observations censored at different values
Dear everyone:
I am a new user of R. I have a dataset with a dependent variable (DV) censored
at different values. The dataset looks like,
conditions .....IDV1 IDV2 DV
1 2 4 89
1 6 6 75
1 4 5 0 ( DV<=70)
......
2 3 5 15
2 5 5 0 (DV<=11)
2 ...... 5 6 14
I do not know how to ajust the code in the VGAM pacakage. I would like to get
some some suggestions. Thank you very much.
Young
_________________________________________________________________
[[alternative HTML version deleted]]
Terry Therneau
2008-Jan-14 16:23 UTC
[R] How to fit a Tobit model with observations censored at different values
> I am a new user of R. I have a dataset with a dependent variable (DV) censored > at different values. The dataset looks like,conditions ..... IDV1 IDV2 DV 1 2 4 89 1 6 6 75 1 4 5 0 ( DV<=70) ...>I do not know how to ajust the code in the VGAM pacakage. I would like to get > some some suggestions. Thank you very much.I do not know how to adjust the VGAM package, but it is very easy to fit Tobit models using survreg. Let DV1 = the value of DV or the lower threshold and DV2 = 1 if the value is exact and 0 if it is censored. So for the above data DV1 DV2 89 1 75 1 70 0 Then the following will fit a Tobit regression survreg(Surv(DV1, DV2, type='left') ~ x1 + x2 + ..., data=mydata, dist='gaussian') Terry Therneau