BookmarkSubscribeRSS Feed
onpoint1
Calcite | Level 5
I need to create a control group that has the same characteristics as the target population. I used the following:
PROC SURVEYSELECT DATA=HOME.F0468_MOMS OUT=MOMSAMPL METHOD=SRS SAMPRATE=.5 SEED=2;
STRATA TARGCONT MOMAGE GRAVIDITY FPLGR SMOKE MED_RSK LOWWT BMI MARSTAT;
RUN;
However, this is code from a different programmer and I don't really know what it's doing. TARGCONT is the flag that distinguishes Target and Control groups.
Is there a better method? Is there anything I should adjust? Thanks
2 REPLIES 2
sfleming
Calcite | Level 5
This code is taking a simple random sample (method=srs) of 1/2 (samprate=.5) of each strata from the HOME.F0468_MOMS data set and saving the sample as MOMSAMPL. The strata are defined by TARGCONT MOMAGE GRAVIDITY FPLGR SMOKE MED_RSK LOWWT BMI MARSTAT. That is, each stratum is a unique combination of values for the 9 variables listed in the strata statement.

It is odd that TARGCONT is part of the strata statement as this makes it appear as if the target and control groups have already been assigned. Your description of the intended purpose makes me think you may want to remove TARGCONT from the strata statement and then assign the chosen sample to the control group.
onpoint1
Calcite | Level 5
Yes, targcont has been taken out of the STRATA. The target group has already been defined - I'm trying to find a control group with the same characteristics. As I learn more about this PROC I doubt this is what I want to use, but it has been interesting. Thanks.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1535 views
  • 0 likes
  • 2 in conversation