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
Regression results: omitted standard errors and other statisticsHi Everyone, I am trying to estimate the impact of a policy on an outcome that contains 17% zeros (…
Mixed Models - considering time in the interaction term (timepoint##intervention) as continuous or dummyDear Statlisters, I am analysing the data from an medical intervention in a pilot study with 29 ind…
Fixed effects in -xtpcse-Hello everyone, I'm running an analysis with TSCS data and test statistics reveal the presence of a…
RDD with categorical outcome variableI am just wondering if there is anyone out there able to perform rdrobust with categorical outcome v…
Diff-in-diff and parallel trend assumptionThis question is not strictly related to Stata, I will remove if it is inappropriate. In a diff-in-…
Subscribe to:
Post Comments (Atom)
0 Response to Random allocation of observations
Post a Comment