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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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