I was trying out both surveyselect and %boot on the same set of data, thinking they will give me the same results;however, I did not get that. The 95% PTCI from two procedures are different and here are the code:
For %boot:
%macro analyze(data=,out=);
proc means noprint data=&data;
%bystmt;
var x;
output out=&out(drop=_type_ _freq_) skew=_Skewness;
run;
%mend;
%boot(data=RandInt,
samples=5000,
random=12345,
chart=0,
stat=_Skewness,
alpha=0.05,
print=1);
proc print data=bootstat noobs;
id method n;
var value bootmean bias stderr biasco alcl aucl;
run;
%bootci(PCTL);
For survey select:
%let NumSamples = 5000;
proc surveyselect data=RandInt NOPRINT seed=12345
out=BootSSFreq(rename=(Replicate=SampleID))
method=urs
samprate=1
OUTHITS
reps=&NumSamples;
run;
proc means data=BootSSFreq noprint;
by SampleID;
freq NumberHits;
var x;
output out=OutStats skew=Skewness;
run;
proc univariate data=BootSSFreq noprint;
var Skewness;
output out=Pctl
pctlpre =CI95_
pctlpts =2.5 97.5
pctlname=Lower Upper;
run;
proc print data=Pctl noobs; run;
1. How far off are they? Since this is a simulation they should be really close but not necessarily exact.
2. Look at the VARDEF options in PROC UNIVARIATE and check the note about the df and n-1 denominator in the %boot macro, if that's applicable here.
1. How far off are they? Since this is a simulation they should be really close but not necessarily exact.
2. Look at the VARDEF options in PROC UNIVARIATE and check the note about the df and n-1 denominator in the %boot macro, if that's applicable here.
They are the same up to 1 decimal place. I guess I have to choose one of the two to use then. THANK YOU!
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!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.