Hello, I have a dataset with 60 clusters that can be divided into 14 stratum. I would like to randomly allocate these 60 clusters into 2 groups - 30 intervention and 30 control. I would like to ensure balance between the two groups across 14 geographic sectors- hence, why I am choosing to do stratified sampling.
However, the number of clusters in each strata varies, with 8 out of the 14 stratum having an odd number of clusters. I would like to do proportional allocation, where the clusters within each strata have a 50% chance of being allocated to the two groups, but also maintain an equal number in the 2 groups - 30 clusters in each.
I have tried the following:
sample 50, by(sector)
This samples 34 clusters because there are 8 stratum that have an odd number of clusters. The sample to be chosen is being rounded up, giving me 4 extra clusters in my desired sample of 30.
The only solution I can think of is randomly selecting 4 of the 8 stratum with odd observations and having those stratum round up the selected clusters and the remaining stratum round down. This would give me my desired sample size of 30 in each group, but would require some manual calculations.
Is there a code that could make this simpler?
Thank you for your support - I'm a first time Statalist user.
Related Posts with Stratified Sampling into Equal Groups using Proportional Allocation with Odd and Even Observations in Stratum
Logit Confidence IntervalsHi, I was wondering whether someone could help me get less confused. I have run a logit model , whe…
Meta forestplot and Meta summarizeDear Stata Users, I am working in a meta analysis of prior 20 studies. In several studies I have co…
Reshape Best to Worst datasetDear all, I turn to you for a second request for help linked to the question at the link: https://ww…
Using data from multiple files (Excel)Hi everyone, I'm still taking my first steps in Stata. Still, I have quite a lot of data (simulated…
spmatrix -same coordinatesDear all, I tried to create an inverse spatial weight matrix, but without success. I rely on a cros…
Subscribe to:
Post Comments (Atom)
0 Response to Stratified Sampling into Equal Groups using Proportional Allocation with Odd and Even Observations in Stratum
Post a Comment