开发者

both x and y variables are censored in a regression

开发者 https://www.devze.com 2023-02-19 08:44 出处:网络
开发者_StackOverflow中文版Is there any existing routine in R to do Tobit regression model with both censored x and y varialbes? I know survreg function in survival pacakge can deal with censored respo

开发者_StackOverflow中文版Is there any existing routine in R to do Tobit regression model with both censored x and y varialbes? I know survreg function in survival pacakge can deal with censored response variables. What about the left censored x predictor variable?


There is a framework for both for tobit regression and for "interval"-censored variables in the survival package. This is Therneau's example using Tobin's original data:

tfit <- survreg(Surv(durable, durable>0, type='left') ~age + quant,
                data=tobin, dist='gaussian')

predict(tfit,type="response")

And the Surv function will accept interval censoring.

0

精彩评论

暂无评论...
验证码 换一张
取 消