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
Replacing column values with values of the same column by household idHi everyone, I have missing values in the variable "religion" for the year 2009. I want to copy the…
Using asdoc, acum to store values that I can write laterI am trying to use asdoc to create a table with the data I want. I first use: Code: sum XYZ if tin…
Diagnostic Tests Panel DataDear all, I am working on my thesis using panel data in Stata but we never really discussed this in…
Obtaining milliseconds from -now()-According to the documentation: tc = now() where tc: number of milliseconds from 01jan1960 00…
Using esttab to show both linear regression and logistic regression (odds ratio) outcomesHello, I'm trying to display 3 regression outcomes together by using Code: esttab command. Among t…
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