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
Summarizing Shapes of String-VariablesHello everybody, i have to summarize the shapes of a string variable. Background: I have a Variabl…
Inflated standard errorsHi Statalist, I am running an iv model (using ivreg2 command), however, I am having an issue with s…
Spearman correlation between groupHello, I have a binary variable 1=yes, 0=no. I want to run spearman correlations covering 6 ordinal…
Modifiy datasetHello,I have a datasat which look like this: PHP Code: id sv_val_final …
Trailing zeroDear all, I am struggling with an apparently easy issue. I would like to add to my graph the traili…
Subscribe to:
Post Comments (Atom)
0 Response to Question about using if flag + tab together
Post a Comment