Hello,
I am looking for a way equivalent to SPSS (AGGREGATE with PIN) syntax
I have data
id zipcode race
1 11364 white
2 11364 black
3 98006 white
4 98006 asian
Then, I want to have
zipcode count asian black white
11364 2 0% 50% 50%
98006 2 50% 0% 50%
Can anyone please have an idea how to get this?
Thank you,
Related Posts with Aggregating and percentage distribution simultaneously
Graphical representation - plotting (moderation)When plotting predicted values of Y across the range of X and with the moderator. (At 5th percentile…
Partially meditated - hypothesisX, Mediator and Y Total effect: 99.693 *** Direct effect: 86.516 *** 13% of the X on Y goes via the …
STATA user - NIS (National Inpatient Sample Database) helpI am trying to get get the study population with certain cancer diagnoses (ICD10 codes) admitted as …
Omitting Certain Interacted Categorical VariablesI'm trying to implement the Sun & Abraham (2020) correction for an event study with heterogeneou…
How to solve an error when variables do not uniquely identify the observations?Hello, I´m trying to use the following command: "reshape wide value, i(country yearweek) j(new_name…
Subscribe to:
Post Comments (Atom)
0 Response to Aggregating and percentage distribution simultaneously
Post a Comment