proc surveyselect data=predbest method=urs n=462 rep=500 out=boot;
run;
proc glm data=boot outstat=mse noprint;
model sqlike= POSTM LPTI LPC3 share/solution;
by replicate;
RUN;
proc mixed data=boot ;
model sqlike= POSTM LPTI LPC3 share/solution; ods output SolutionF= Boot_est;
by replicate; RUN;quit;
proc sort data=Boot_est; by effect lfp replicate; run;
proc means data=Boot_est n mean p5 p95 std ;
var estimate ;output out=p mean=B_Boot p5=p5Boot p95=p95Boot std=std_boot; run;
data p; set p; drop _TYPE_; rename _FREQ_=replicaz; run; options nolabel;
proc print data=p;run;
/*il dataset p contiene le stime bootstrap per ogni variabile*/
/*confrontiamo stime IRLS con stime BOOTSTRAP*/
proc mixed data=fbbest;
model sqlike= POSTM LPTI LPC3 share/solution ; ods output SolutionF=one_shot2;
run;
data one_shot2; set one_shot2; rename estimate=B_one_shot; run; options nolabel;
proc sort data= one_shot2; by effect ;
proc sort data= p; by effect ;
run;
data diff; merge one_shot2 p; by effect ; run;
data diff2; set diff;
differenza_SE=std_boot-StdErr;
differenza_BETA=B_Boot-B_one_shot;
run;
title 'distribuzione dei parametri e param one shot';
proc print data=diff2;run;
perchè mi fa 2500 replicazioni al posto di 500
ho una sola variabile nel data set p , dovrei avere tutti i bootstrap aiuto !!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.