library(dplyr)
fit1 <- liferegr(
data = tobin %>% mutate(time = ifelse(durable>0, durable, NA)),
time = "time", time2 = "durable",
covariates = c("age", "quant"), dist = "normal")
resid <- residuals_liferegr(fit1, type = "response")
Run the code above in your browser using DataLab