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
Mean t-test including fixed effectsI would like to do a Mean t-test which takes out fixed effects. Does anyone know a Stata formula for…
Difference-in-difference and TreatmentHello, I am supposed to use a difference and difference model to estimate the effect of mergers on …
Importing CSV with multiine text dataI am trying to import a CSV file in which some of the columns contain multiline text data. See below…
Handling addresses in STATAHi! address in the dataset is in the following format: 59 NORTH STREET, PLAINFIELD, MASSACHUSETTS, 0…
How to merge two graphs in STATA into one with A,B labels?I am reading a paper from PNAS. Their figure 1 is as below Array Normally, when running the graph…
Subscribe to:
Post Comments (Atom)
0 Response to Question about using if flag + tab together
Post a Comment