/* output the graph in a webpage using Output Delivery System */
ods
html
file="distract.html";
/* set the
graphical options */
goptions
device=activex;
axis1
order=(0
to 1
by .1);
symbol1
i=join
c=red
width=2;
symbol2
i=join
c=blue
width=2;
symbol3
i=join
c=green
width=2;
symbol4
i=join
c=black
width=2;
/* Round
off the theta value to integers */
data
new; set
theta;
theta = round(t2);
title
"Distractor
analysis";
/* Output
the frequency count */
proc
freq
data=new;
tables
item1 * theta /nopercent
norow
out=t;
proc
sort;
by
theta;
/* Sum the
frequency count by theta */
proc
summary
data=t;
var
count; class
theta; output
out=tb
sum=sum;
/* Merge
the proc summary and proc freq output, compute the conditional prob */
data
tmp; merge
t tb; by
theta;
if
_type_ = 0
then
delete;
prob = (count/sum);
/* Plot the
data */
proc
gplot;
plot
prob*theta = item1 / vaxis=axis1;
run;
ods
html
close;
quit;
