[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Kieran McCaul" <[email protected]> |

To |
<[email protected]> |

Subject |
st: bug in charlson.ado program |

Date |
Thu, 12 Nov 2009 15:43:51 +0800 |

... A few days ago a question came up regarding the user-written -charlson- program and I indicated that there was a bug in this program. The following code is at line 379 in charlson.ado: forvalues i=1/17 { gen weightch`i'=0 quietly replace weightch`i'=1 if ynch`i'==1 } *Change weights for more serious comorbidites (for calculation of charlson index, based on sum of weights) quietly replace weightch12=2 if ynch12>0 quietly replace weightch13=2 if ynch13>0 quietly replace weightch14=2 if ynch14>0 quietly replace weightch15=3 if ynch15>0 quietly replace weightch16=6 if ynch16>0 quietly replace weightch17=6 if ynch17>0 This block of code assigns weights to diagnoses flagged by the Charlson program. There are 17 comorbidities (ynch1 to ynch17) and if these are flagged then the weights are set to 1 initially in the -forvalues- loop. More serious comorbidities are weighted more heavily and this is done in the lines that follow the -forvalues- loop. So this code would assign a weight of 1 to any of the first 11 comorbidities (ynch1 to ynch11) and higher weights to the remaining 6 comorbidities (ynch12 to ynch17). Now the problem is that ynch11 is "Diabetes with complications" and in the Charlson weighting scheme this should receive a weight of 2, but in the code above it receives a weight of 1. So an extra line is needed: quietly replace weightch11=2 if ynch11>0 This was discovered by some of my colleagues (Janine Calver and Zoe Hyde) some time ago and they did contact the author of charlson.ado, but the correction has not appeared (yet). ______________________________________________ Kieran McCaul MPH PhD WA Centre for Health & Ageing (M573) University of Western Australia Level 6, Ainslie House 48 Murray St Perth 6000 Phone: (08) 9224-2701 Fax: (08) 9224 8009 email: [email protected] http://myprofile.cos.com/mccaul http://www.researcherid.com/rid/B-8751-2008 ______________________________________________ If you live to be one hundred, you've got it made. Very few people die past that age - George Burns * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:

- Prev by Date:
**RE: st: How to create a random number identifier number** - Next by Date:
**AW: st: Intraclass correlation and binary hierarchical models** - Previous by thread:
**st: How to create a random number identifier number** - Next by thread:
**Re: st: bug in charlson.ado program** - Index(es):

© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |