DATA Step, Macro, Functions and more

help bootstap!!

Reply
Contributor
Posts: 22

help bootstap!!

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

Contributor
Posts: 22

Re: help bootstap!!

Posted in reply to michshoot
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 ??
Ask a Question
Discussion stats
  • 1 reply
  • 78 views
  • 0 likes
  • 1 in conversation