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
Spmap plotting regression coefficients and indicating significanceHi everyone, I want to plot country specific regression coefficients as well as the significance le…
Transforming a series to be standard normal in panel dataHi all, May I have a basic question: how can I make/transform a series/variable to be standard norm…
Reshape wide to long: many variables of many yearsHi All, I have a dataset with more than 10 variables of more than 10 years in wide shape. I'm tryin…
Sargan-Hansen testHi. I am trying to obtain results for the Sargan-Hansen test. However, when I run a regression usin…
Significant OLS results but insignificant IV results and the insignificant endogeneity testDear all, I want to explore the effects of X on Y. Considering X might be an exogenous variable, I …
Subscribe to:
Post Comments (Atom)
0 Response to Aggregating and percentage distribution simultaneously
Post a Comment