*----- Personality Test and Improvement in Therapy ----; Title 'Simple Regression: Bootstrap samples'; data THERAPY; input NAME $ SEX $ PERSTEST THERAPY ; label PERSTEST = Personality Test Score THERAPY = Improvement in Therapy ; datalines; John M 26 32 Susan F 24 40 Mary F 22 44 Paul M 33 44 Jenny F 27 48 Rick M 36 52 Cathy F 30 56 Robert M 38 56 Lisa F 30 60 Tina F 34 68 ; *bootreg (data=therapy, sample=100, model='therapy=perstest', plot=Y); *proc print data=estdata; %macro analyze(data=, out=); options nonotes; proc reg noprint data=&data outest=&out(drop=therapy _rmse_); model therapy=perstest; id name; %bystmt; data &out; set &out; label perstest='Perstest Slope'; run; run; options notes; %mend; *include goptions; %boot(data=therapy, random=245345, gchart=1); %bootci(stat=perstest, method=pctl); /* proc univariate data=bootdist(drop=_sample_) noprint; histogram _numeric_ / kernel(l=1 c=mise) normal(l=3); inset mean std p5 p95; */