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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1516 views
  • 0 likes
  • 2 in conversation