BookmarkSubscribeRSS Feed
michshoot
Fluorite | Level 6
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 !!plot1.pngplot2.jpgplot3.pngplot4.pngplot5.jpg

1 REPLY 1
michshoot
Fluorite | Level 6
proc sort data=Boot_est; by effect lfp replicate; run;
I copied this script, lpt is not my variable,
what should I put in the proc reg in order by if I do not have a class variable ??

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!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 694 views
  • 0 likes
  • 1 in conversation