Hello to everyone!
I am very new to Stata and I am struggling with a problem, which I cannot solve so far. I have three dummy variables: group 1, group 2 and group 3
I am trying to find a way to sum the frequencies of all groups if they take the value 0 or 1.
For example I want to get totalzero=3.800 + 1.366 + 1.500 and totalone = 261 + 2.008 + 2.561
. tab1 group1 group2 group3
-> tabulation of group1
group1 | Freq. Percent Cum.
----------------------------------------------
0 | 3,800 93.57 93.57
1 | 261 6.43 100.00
-----------------------------------------------
Total | 4,061 100.00
-> tabulation of group2
group2 | Freq. Percent Cum.
-----------------------------------------------
0 | 1,366 40.49 40.49
1 | 2,008 59.51 100.00
-----------------------------------------------
Total | 3,374 100.00
-> tabulation of group3
group3 | Freq. Percent Cum.
-----------------------------------------------
0 | 1,500 36.94 36.94
1 | 2,561 63.06 100.00
-----------------------------------------------
Total | 4,061 100.00
Could you please explain to me what can I do? I tried to add the 3 dummy variables first but it doesnt give me the sum of frequencies.
Thank you very much in advance!!!
Related Posts with Adding frequencies conditional on several variables
estimating percentiles of gamma distributionHi, I'm a new stata user and currently I'm trying to fit a gamma distribution to my data and compute…
'F model statistic missing' when testing parallel trendHello everyone, There was a birth policy implemented only in urban area in 2015,and I’m trying to t…
Add legend using grqregHi, I want to add legend after running grqreg. the codes are . webuse auto, clear . sqreg price wei…
Vector autoregression modelsI am new to working with time series data. I am looking to see how sudden larges changes in the pric…
Staggered Difference in Difference: How to properly regressHey everyone, ok so I'm completely new to Stata and I have no clue how to run my Staggered Differenc…
Subscribe to:
Post Comments (Atom)
0 Response to Adding frequencies conditional on several variables
Post a Comment