Laura Bonnett
2008-Aug-06 11:37 UTC
[R] Variance-covariance matrix for parameter estimates
Dear All, I am currently working with the coxph function within the package survival. I have the model h_ij = h_0(t) exp(b1x1 + b2x2) where the indicator variables are as follows: x1 x2 VPS 0 0 LTG 1 0 TPM 0 1 [[alternative HTML version deleted]]
Laura Bonnett
2008-Aug-06 11:47 UTC
[R] Variance-covariance matrix for parameter estimates
(Sorry, my last email appeared to be missing the important bits so I'll try again!) Dear All, I am currently working with the coxph function within the package survival. I have the model h_ij = h_0(t) exp( b1x1 + b 2x2) where the indicator variables are as follows: x1 x2 A 0 0 B 1 0 C 0 1 The hazard rates are: B h_ij(t)=h_0(t)exp(b1) C h_ij(t)=h_0(t)exp(b2) A h_ij(t)=h_0(t) This therefore means that the hazard ratios are B:A h_0(t)exp(b1)/h_0 = exp(b1) C:A exp(b2) B:C exp(b1)/exp(b2) Using coxph, it is easy to determine B:A and C:A with their associated confidence intervals and it is fairly trivial to obtain the hazard ratio for B:C (by isolating the exponentiated coefficients for both previously fitted models and dividing them.) However, I cannot work out how to determine the confidence interval for B:C. I know that it will be clear from the variance-covariance matrix, but how do I obtain that? I have looked at functions such as vcoc and Var but the problem I have is that B:A is what I have called fit1 and C:A is called fit2 and there appears to be no easy way to combine these fitted models to produce the required matrix. Thank you for your help, Laura P.S. Sorry again for the 1st attempt. [[alternative HTML version deleted]]