I am analysing a randomised trial of a drug versus untreated controls in 5418 children with 512 deaths. The relevant variables (all numeric) are:
- drug (0,1)
- ismale (0,1)
- birthweight (continuous)
- diedinfection (0,1)
I would like to adjust for sex and birthweight in a Cox model (the hazards are proportional) and calculate (a) the adjusted ratio and 95% CI for deaths from infection per person-year for drug versus control, and (b) the adjusted ratio and 95% CI for deaths from non-infectious causes per person-year for drug versus control. I assume that, having stset the data, I would run in Stata 17 the command:
and then use lincom to calculate the drug/control ratios for (a) deaths from infection and (b) deaths from non-infectious causes. I'd be very grateful for advice about what lincom commands to use to obtain the two ratios and 95% CIs.
- drug (0,1)
- ismale (0,1)
- birthweight (continuous)
- diedinfection (0,1)
I would like to adjust for sex and birthweight in a Cox model (the hazards are proportional) and calculate (a) the adjusted ratio and 95% CI for deaths from infection per person-year for drug versus control, and (b) the adjusted ratio and 95% CI for deaths from non-infectious causes per person-year for drug versus control. I assume that, having stset the data, I would run in Stata 17 the command:
Code:
stcox i.drug##i.diedinfection i.ismale c.birthweight

Comment