Create dataset cowgmd for plm (from docs):
data cow;
input current response trial experiment;
datalines;
0 0 35 1
0 0 35 2
1 6 35 1
1 3 35 2
2 13 35 1
2 8 35 2
3 26 35 1
3 21 35 2
4 33 35 1
4 27 35 2
5 34 35 1
5 29 35 2
;
data prior;
input _type_$ current;
datalines;
mean 100
var 50
;
proc genmod data=cow;
class experiment;
bayes coeffprior=normal(input=prior) seed=1;
model response/trial=current|experiment / dist=binomial;
store cowgmd;
title 'Bayesian Logistic Model on Cow';
run;
Applying the method in the PhUSE paper you mentioned:
%let png_dest = /folders/myfolders/sasuser.v94;
ods _all_ close;
ods listing gpath="&png_dest" style=Pearl dpi=300;
ods graphics on /reset=index width=8.5cm outputfmt=png imagename='png1';
proc plm source=cowgmd;
estimate 'Diff at current 0' experiment 1 -1 current*experiment [1, 0 1] [-1,
0 2] / plots=boxplot(orient=horizontal);
run;
ods graphics on /reset=index width=8.5cm outputfmt=png imagename='png2';
proc plm source=cowgmd;
estimate 'Diff at current 1' experiment 1 -1 current*experiment [1, 1 1] [-1,
1 2] / plots=boxplot(orient=horizontal);
run;
ods graphics on /reset=index width=8.5cm outputfmt=png imagename='png3';
proc plm source=cowgmd;
estimate 'Diff at current 2' experiment 1 -1 current*experiment [1, 2 1] [-1,
2 2] / plots=boxplot(orient=horizontal);
run;
ods graphics on /reset=index width=8.5cm outputfmt=png imagename='png4';
proc plm source=cowgmd;
estimate 'Diff at current 3' experiment 1 -1 current*experiment [1, 3 1] [-1,
3 2] / plots=boxplot(orient=horizontal);
run;
Key changes I had to make to get the next part to work:
1. Rewrite the combine step so that the macro variable for the folder path resolves.
2. Add 'ods escapechar '^' so that the style carat is escaped.
data combine;
length c1 c2 $100;
c1=cats('^S={width=8.5cm just=center preimage="', "&png_dest", '/png1.png"}');
c2=cats('^S={width=8.5cm just=center preimage="', "&png_dest", '/png3.png"}');
output;
c1=cats('^S={width=8.5cm just=center preimage="', "&png_dest", '/png3.png"}');
c2=cats('^S={width=8.5cm just=center preimage="', "&png_dest", '/png4.png"}');
output;
run;
ods html file="&png_dest/test.html" style=sasweb;
ods escapechar='^';
proc report data=combine nowindows style=[rules=none frame=void cellpadding=0]
list;
columns c1 c2;
define c1-c2 /display ' ';
run;
-unison
... View more