Solution: Properties of betahat from Cox regression (Exam 2022)
Eksempel
Solution
The estimated relative risk function is
\[\underline{\underline{r(x,\widehat{\beta}) = \exp\left\{ 0.066748\cdot \mbox{age} + 0.236694\cdot \mathbb{I}(\mbox{sex=male}) - 0.084901 \cdot \mbox{mspike}\right\}}}.\]
The ratio of the hazard rate for a female of age 50 years over the hazard rate of a female of age 51 years, when the mspike value is the same, becomes
\[\frac{\exp\{\beta_{\tiny \mbox{age}}\cdot 50 + \beta_{\tiny \mbox{sex}}\cdot 0 + \beta_{\tiny \mbox{mspike}} \cdot \mbox{mspike}\}}{\exp\{\beta_{\tiny \mbox{age}}\cdot 51 + \beta_{\tiny \mbox{sex}}\cdot 0 + \beta_{\tiny \mbox{mspike}} \cdot \mbox{mspike}\}} = e^{-\beta_{\tiny \mbox{age}}}.\]
From the R output we find a \(95\%\) confidence interval for \(\beta_{\tiny \mbox{age}}\) to be
\[\left[ 0.066748-1.96\cdot 0.007051, 0.066748+1.96\cdot 0.007051\right] = [0.05292804,0.08056796]. \]
Since \(e^{-\beta_{\tiny \mbox{age}}}\) is strictly decreasing as a function of \(\beta_{\tiny \mbox{age}}\) the corresponding \(95\%\) confidence interval for \( e^{-\beta_{\tiny \mbox{age}}}\) becomes
\[ \left[ e^{-0.08056796},e^{-0.05292804}\right] = \underline{\underline{[0.9225922,0.9484483]}}.\]
The relative risk function it is asked for is
\[ r = \exp\left\{ \beta_{\tiny \mbox{age}}\cdot 35 + \beta_{\tiny \mbox{sex}}\cdot 1 + \beta_{\tiny \mbox{mspike}}\cdot 1.5\right\}. \]
The estimate for \(r\) is
\begin{align*} \widehat{r} &= \exp\left\{ \widehat{\beta}_{\tiny \mbox{age}}\cdot 35 + \widehat{\beta}_{\tiny \mbox{sex}}\cdot 1 + \widehat{\beta}_{\tiny \mbox{mspike}}\cdot 1.5\right\}\\ &= \exp\left\{ 0.066748\cdot 35 + 0.236694\cdot 1 - 0.084901\cdot 1.5\right\}\\ &= \exp\{ 2.445523\}. \end{align*}
Using that the vector of estimators, \(\widehat{\beta}\), are approximately multivariate normal with a covariance matrix as given in the R output we get that \(\ln (\widehat{r})\) is also approximately normal with mean equal to \(\ln (r)\) and variance
\begin{align*} \mbox{Var}[\ln (\widehat{r})] &= \left[\begin{array}{c}35\\1\\1.5\end{array}\right]^T \cdot \left[ \begin{array}{ccc}4.972337e-05 & -7.378061e-05 & 4.857322e-05 \\ -7.378061e-05 & 1.871872e-02 & 1.957005e-04\\ 4.857322e-05 & 1.957005e-04 & 2.922280e-02\end{array}\right] \cdot \left[\begin{array}{c}35\\1\\1.5\end{array}\right]\\ & = 0.1459038. \end{align*}
A \(95\%\) confidence interval for \(\ln(r)\) is thereby
\begin{align*} &[\ln (\widehat{r}) - 1.96\sqrt{0.1459038}, \ln (\widehat{r}) -1.96\sqrt{0.1459038}]\\&= [2.445523 - 1.96\sqrt{0.1459038}, 2.445523 +1.96\sqrt{0.1459038}\\&= [1.696855,3.194191].\end{align*}
A \(95\%\) confidence interval for \(r=e^{\ln (r)}\) is then
\[ [\exp\{1.696855\},\exp\{3.194191\}] = \underline{\underline{[5.456759,24.39043]}}.\]