* WP;
title2"WP";
data WP;
input Treatment$ Rep Day1 Day2 Day3 Day4 Day5 Day6 Day7 Day8 Day9 Day10;
datalines;
Ec 1.00 0.00 0.25 0.52 0.77 0.89 0.89 1.02 1.02 1.02 1.15
Ec 2.00 0.00 0.51 0.92 1.13 1.23 1.23 1.43 1.44 1.53 1.53
Ec 3.00 0.00 0.33 0.44 0.44 0.66 0.88 0.88 1.32 1.65 2.74
Ec 4.00 0.00 0.99 1.58 2.67 3.36 4.73 5.33 9.08 9.27 9.57
FB 1.00 0.00 0.59 0.69 1.75 1.98 1.98 2.23 2.67 2.78 2.90
FB 2.00 0.00 0.79 1.24 1.24 1.45 1.80 1.93 2.29 2.73 2.96
FB 3.00 0.00 0.42 0.72 1.34 1.75 2.26 2.57 2.78 2.88 5.14
FB 4.00 0.00 2.05 3.49 4.64 6.16 7.04 7.52 12.88 15.68 15.68
RES 1.00 0.00 1.34 1.47 1.83 2.07 2.19 2.58 2.95 3.31 3.31
RES 2.00 0.00 0.68 0.79 1.24 1.47 1.47 1.57 2.05 2.37 2.60
RES 3.00 0.00 0.76 1.31 1.85 2.18 2.18 2.40 2.94 3.48 4.68
RES 4.00 0.00 3.42 5.07 6.73 7.71 9.47 10.35 14.85 17.10 17.10
;
run;
* Convert columns of observations to rows - useful for plotting;
data WPplot;
set WP;
keep treatment rep Day WP;
Day=1; WP=Day1; output;
Day=2; WP=Day2; output;
Day=3; WP=Day3; output;
Day=4; WP=Day4; output;
Day=5; WP=Day5; output;
Day=6; WP=Day6; output;
Day=7; WP=Day7; output;
Day=8; WP=Day8; output;
Day=9; WP=Day9; output;
Day=10; WP=Day10; output;
run;
* Print column data set;
proc print data=WPplot;
run;
* Plot observations for each subject through Day;
proc gplot data=WPplot uniform;
by treatment;
plot WP*Day=rep;
symbol1 i=j;
run;
* Plot means for each treatment through Day;
proc gplot data=WPplot;
plot WP*Day=treatment;
symbol1 i=std1mjt;
run;
* Profile analysis and repeated measures ANOVA;
proc glm data=WP;
class treatment;
model Day1 Day2 Day3 Day4 Day5 Day6 Day7 Day8 Day9 Day10= treatment / nouni;
repeated Day profile;
run;
* Mixed models analysis;
proc mixed data=WPplot;
class treatment Day rep;
model WP = treatment Day treatment*Day / outp=resids;
* Try type=cs, type=ar(1), or type=un and compare AIC or BIC values.
The model with smallest AIC or BIC is the best model;
repeated / type=cs subject=rep(treatment) rcorr;
run;
quit;
proc sgplot data=resids;
vbarparm category=day response=pred /group=treatment
groupdisplay=cluster
limitlower=lower
limitupper=upper
;
run;
proc means data=sashelp.cars noprint nway;
where origin='USA';
class make cylinders;
var mpg_city;
output out=have (where=(lclm ne . )) mean=vag lclm=lclm uclm=uclm;
run;
*creat graph;
ods html style=meadow;
vbarparm category=make response=avg / /*set x axis and response variables*/
group=cylinders /*specify how to group the variables*/
groupdisplay=cluster /*make sure bars aren't stacked*/
limitlower=lclm /*error bar lower limit*/
limitupper=uclm /*error bar upper limit*/;
run; Many thanks for your explanation, actually what I am looking for, I need the letter that show the differences on the bars. I am try to run this program, but there is some thing wrongs. The code I add did not work. I saw the example it look difference Best Regards Samir
... View more