Hi all,
I am trying to create a Table 1 using Medicare claims to compare demographics among people who do and do not have an outcome, acute MI. I am using a file in which there are multiple claims per person. Each person is identified by a ilinkid.
I created a flag using:
egen byte flag = tag(ïlinkid)
I also created two categories of people with and without acute MI. A person who has acute MI is in category hasMI=1, and a person who doesn't is in hasMI=0.
I was wondering if there was any way to use tab along with the demographic category and the flag. For example, I tried: "tab race if hasMI==1, if flag" which does not work. I want my percentages to be based on # people in the cohort, not on the # claims.
I appreciate any help!
Related Posts with Question about using if flag + tab together
using function condhello ! i want to create a new variable that's equal to value of year 1960 for all countries and ye…
melogit postestimationGreetings. I am reaching out for help with melogit postestimation commands. I am using melogit to m…
melogit postestimationGreetings. I am reaching out for help with melogit postestimation commands. I am using melogit to m…
Three and five year averagesDear Statalist forum, I would like to construct a three-year average as the data is available in th…
Seemingly Unrelated Regression Equation: NEED HELPGood day! I am doing my research study. My dependent variable is Corruption Perception Index. My In…
Subscribe to:
Post Comments (Atom)
0 Response to Question about using if flag + tab together
Post a Comment