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
Interpreting the economic significance of regression coefficientsDear Stata members, For replicating a paper, I have chosen 2 variables, cash divided by total assets…
PstestHi, I'm using Stata 16 for my analysis. I've run the pstest command to obtain results for the balan…
Fixed effects for IV using cross section dataDear Statlist users, I am studying the impact of parental investments in early childhood, as record…
Generating elasticities for individual cases using the 'aidsills' commandDear Statalisters, I'm using the 'aidsills' command for estimating demand systems developed by Lecoq…
Problems with Merge 1:1 using unique id numberGood morning all, I am a PhD student and relative newcomer to Stata and was hoping you might be able…
Subscribe to:
Post Comments (Atom)
0 Response to Random allocation of observations
Post a Comment