Hi everyone,
I'm doing survival analysis in Stata 17. I'd like to estimate the rate of mortality and confidence intervals at four time points during my study - 30 days, 1 year, 2 years, and 3 years. I have -stset- the data and can generate KM curves that are both unadjusted and adjusted with inverse probability weights. I can also generate a risk table along with the figure that records. -stpm2- is working fine for estimating risk ratios at the various time intervals I need. However, I'm not sure the best way to extract (if that's the word) the unadjusted and adjusted mortality at my time points of interest. I've been able to use the -ltable- command to get unadjusted mortality, but I'm not sure if this is correct. Regardless, -ltable- doesn't appear to work with probability weighted data. I can generate a risk table with -sts graph-. However, that still seems to require me to do a bit of manual work that seems a bit prone to error. I've also been able to output a .dta set that just has the KM data in it, but I'm not sure what to do with this next now that I have it.
I would welcome advice on how best to take the KM curves I have plotted and estimate mortality and 95% CIs at various time points. Happy to post any code that is relevant - just not sure what might be needed yet!
Thanks!
I'm doing survival analysis in Stata 17. I'd like to estimate the rate of mortality and confidence intervals at four time points during my study - 30 days, 1 year, 2 years, and 3 years. I have -stset- the data and can generate KM curves that are both unadjusted and adjusted with inverse probability weights. I can also generate a risk table along with the figure that records. -stpm2- is working fine for estimating risk ratios at the various time intervals I need. However, I'm not sure the best way to extract (if that's the word) the unadjusted and adjusted mortality at my time points of interest. I've been able to use the -ltable- command to get unadjusted mortality, but I'm not sure if this is correct. Regardless, -ltable- doesn't appear to work with probability weighted data. I can generate a risk table with -sts graph-. However, that still seems to require me to do a bit of manual work that seems a bit prone to error. I've also been able to output a .dta set that just has the KM data in it, but I'm not sure what to do with this next now that I have it.
I would welcome advice on how best to take the KM curves I have plotted and estimate mortality and 95% CIs at various time points. Happy to post any code that is relevant - just not sure what might be needed yet!
Thanks!
Comment