[R] Left-truncated regression

Zita Chiquitazita at aol.com
Tue Dec 2 11:22:41 CET 2008


Hi.

I am looking for a function for left-truncated data.
I have one data set with 2 variables (Hours~Yrs_Ed).
I already left-censored the data at 200 and left-truncated it at the same
spot, so that I am able to make 2 estimations (one for censoring and one for
truncation).
I know how to make the linear regression for the left-censored variable
(hours) and how to plot the regression line into the (x,y) plot (packages
AER, Zeileis, Survival, ...):

tfit<-survreg(Surv(Hours,Hours>0,
type='left')~Yrs_Ed,data=DataWomen,dist='gaussian')
z<-predict(tfit,type="response")
plot(Yrs_Ed,Hours)
abline(tfit)

My aim is to compare the effects of truncation and censoring graphically by
plotting the two regression lines into one plot with both datasets (censored
and truncated).
I just can't figure out how to write the function for left-truncated data
and what package to use for this. I only need "left-truncation", not
"left-truncation and right-censoring".
I hope somebody can help me with that matter.

Zita


-- 
View this message in context: http://www.nabble.com/Left-truncated-regression-tp20789446p20789446.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list