Solved – Linear combination of coefficients after ‘survreg’ in R

confidence intervalrsurvival

I am new to R and I am looking for a function that resembles the 'lincom' command in Stata.
Specifically, I am running a parametric model for interval censored data using the function 'survreg'. "Exposure" is dichotomous.

mod <-survreg(Surv(tleft,tright,type=c('interval2')) ~ exposure, dist="gaussian")

The output returns the estimate of $\beta_0$ (survival time for "exposure"=0), with confidence interval, and the estimate of $\beta_1$.

How do I obtain an estimate, with confidence interval, of the linear combination $\beta_0 + \beta_1$ (survival time for "exposure"=1)?

Best Answer

You can estimate $\beta_0 + \beta_1$ using $\hat{\beta}_0 + \hat{\beta}_1$ and by looking at the output of summary(mod, corr=TRUE) you can get an estimated covariance matrix for the parameter estimates. Since $\text{Var}(\hat{\beta}_0 + \hat{\beta}_1) = \text{Var}(\hat{\beta}_0) + \text{Var}(\hat{\beta}_1) + 2 \text{Cov}(\hat{\beta}_0, \hat{\beta}_1)$ you can plug in these estimates to get an approximation of $\text{Var}(\hat{\beta}_0 + \hat{\beta}_1)$ and then construct an interval using standard normal quantiles. For instance,

$$ \left ( \hat{\beta}_0 + \hat{\beta}_1 - 1.96 \sqrt{\widehat{\text{Var}}(\hat{\beta}_0 + \hat{\beta}_1)}, \hat{\beta}_0 + \hat{\beta}_1 + 1.96 \sqrt{\widehat{\text{Var}}(\hat{\beta}_0 + \hat{\beta}_1)} \right ) $$

could be taken as a $95\%$ confidence interval for $\beta_0 + \beta_1$.