Regarding direct standardization of variables based on epidemiology, I was wondering what is the correct way to implement the command dstdsize in the following situation:
1) I need to age/sex-standardize a variable Z.
2) To simplify, I have an unbalanced panel data set, by hospital ID.
3) There is one variable that accounts the average number of users for each hospital (U), and four more variables that decompose the amount of users by age categories (U1, U2, U3, U4). The same happens for users’ sex in terms of percentage (S1 and S2). Then, I have two more variables related to ownership (O) and Integration (I).
4)
From the help file of this command in Stata I’m not being able to extend for my case the presented examples, for which I’d appreciate some help.
Thanks,
Maria
1) I need to age/sex-standardize a variable Z.
2) To simplify, I have an unbalanced panel data set, by hospital ID.
3) There is one variable that accounts the average number of users for each hospital (U), and four more variables that decompose the amount of users by age categories (U1, U2, U3, U4). The same happens for users’ sex in terms of percentage (S1 and S2). Then, I have two more variables related to ownership (O) and Integration (I).
4)
Code:
dstdize Z U (??? how to include U1-U4 + S), by(O)
Thanks,
Maria
Comment