These data were used to study a possible effect of marital bereavement (loss of husband or wife) on all–cause mortality in the elderly. The dataset was extracted from a larger follow-up study of an elderly population and concerns subjects whose husbands or wives were alive at entry to the study. Thus all subjects enter as not bereaved but may become bereaved at some point during follow–up. The variable dosp records the date of death of each subject’s spouse and takes the value 1/1/2000 where this has not yet happened.
library('knitr') read_chunk('../q22.R') opts_chunk$set(cache=FALSE,dpi=20)
You may have to install the required packages the first time you use them. You can install a package by install.packages("package_of_interest")
for each package you require.
i. The timescale is attained age, which would seem to be a reasonable choice. ii. Males have the higher mortality which is to be expected. iii. Age could potentially be a confounder. Males are slightly older at diagnosis (although we haven't studied pairwise differences).
Now find the (crude) effect of bereavement.
We could split the post bereavement period into multiple categories (e.g., within one year and subsequent to one year following bereavement) and compare the risks between these categories.
Cox regression: effect of brv
controlled for attained age:
Cox regression estimating the effect of brv
for each sex,
controlling for age:
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.