BookmarkSubscribeRSS Feed
Weidsoncs
Calcite | Level 5

Dear sir,

 

An adhesiveness dataset was generated for 63 subjects (64 total -1 dropout = 63 final) from a Crossover Design with 2 periods and 2 treatments (Crossover 2x2 ). I intend to estimate a parametric boostraping confidence interval for the difference of the two treatments (T, R) in order to estimate the size of the bias. A more experienced SAS user suggested using PROC SURVEYSELECT to resampling from the final dataset (63 survey subjects). The code suggested by him can be verified below.

 

However, when I run this code I notice that in many replicates generated the treatment sequences (one of the cluster levels) were quite unbalanced (with very different sample sizes) when ideally they would have similar sample sizes. Does anyone have any suggestions on how to modify the code to get less unbalanced treatment sequences?

 Title Bootstrap analysis;

PROC SURVEYSELECT data=work.ADHESIVENESS method=BALBOOTSTRAP reps=100;
SAMPLINGUNIT Subject;
run;
quit;

 

 

 

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Hello @Weidsoncs and welcome to the SAS Support Communities!

 

A simple way to improve the balance of the treatment sequences in the bootstrap samples would be to use stratified sampling, i.e., add the STRATA statement

strata Sequence;

to your PROC SURVEYSELECT step after sorting the input dataset (work.ADHESIVENESS) by variable Sequence. Then all 100 replicates will have 31 subjects (62 observations) with Sequence='RT' and 32 subjects (64 observations) with Sequence='TR'.

 

Not sure how this will affect your intended parametric CI estimation, though.

Weidsoncs
Calcite | Level 5

The solution that I found was exataly this !!! Thank you for help... 

 

see the complete code:

proc sort data=work.maydataset1;
   by Sequence;
run;

PROC SURVEYSELECT data=work.mydataset method=BALBOOTSTRAP reps=100 out=maydataset2;
SAMPLINGUNIT Subject;
Strata Sequence;
run;
quit;

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 507 views
  • 4 likes
  • 2 in conversation