Dear Community.
I have about five million observations(men, age 40s).
I'd like to classify these 5 million people into 10 groups (randomly) according to the distribution below.
In other words, each observation should be allocated from group 1 to 10, but should be matched overall proportion of the group.
group proportion
1 0.07
2 0.19
3 0.16
4 0.12
5 0.21
6 0.01
7 0.05
8 0.04
9 0.1
10 0.05
(total 1.00)
In addition, I have an overall observation of about 20 million people, and the above tasks should be performed by gender*age groups.
Thanks in advance.
Best regards,
Yunsun
Related Posts with Random allocation of observations
Twoway line for tabulated resultsHello Everyone! I am using stata 16 and my data us the demographic health survey women's module. I …
Doing Diff-in-Diff with lagged dependent using xtabondHi, I'm doing a diff-in-diffs type of model with xtabond, but would be grateful for help establishin…
Structural Breaks in time-seriesHi everyone! I really need your advice!! I have a multivariate time-series model with yearly observ…
Interpretation of Outreg2 table on terrorism event studyHi everyone! I am a student and do a thesis on the abnormal return generated by domestic terrorism …
Forval loops with if-conditions in Panel dataHello together. I am still struggling with my current research. I want to run the following code in…
Subscribe to:
Post Comments (Atom)
0 Response to Random allocation of observations
Post a Comment