I am using -dstdize- with Stata 13.1 to compute age-standardized mortality rates with CI.
My popvar is the exposure, person-years, which is not an integer. In Stata I get the error message "<popvar > must have nonnegative integer values". But I don't see why this restriction should be necessary. I have now made my own version of the dstdize.ado-file. My version skips the following lines of code in the original ado-file:
capture assert `pop' >=0 & int(`pop')==`pop' if `touse'
if _rc {
di in red `"`pop' must have nonnegative integer values"'
exit 499
}
This way, the non-integer popvar is accepted, and rates and their CIs look OK. From the formulas for the standardized rate SR and its standard error se(SR) I can't see any problems with relaxing the integer restriction, but mayby I am overlooking something here?
(Of course negative values are also accepted in my version of the command. That is probably not so good, but easy to fix).
Any thoughts?
Jørgen
My popvar is the exposure, person-years, which is not an integer. In Stata I get the error message "<popvar > must have nonnegative integer values". But I don't see why this restriction should be necessary. I have now made my own version of the dstdize.ado-file. My version skips the following lines of code in the original ado-file:
capture assert `pop' >=0 & int(`pop')==`pop' if `touse'
if _rc {
di in red `"`pop' must have nonnegative integer values"'
exit 499
}
This way, the non-integer popvar is accepted, and rates and their CIs look OK. From the formulas for the standardized rate SR and its standard error se(SR) I can't see any problems with relaxing the integer restriction, but mayby I am overlooking something here?
(Of course negative values are also accepted in my version of the command. That is probably not so good, but easy to fix).
Any thoughts?
Jørgen
Comment