I have a test contains 150 items, item difficulty parameter for each item is as attached. Suppose I now have candidate whose ability level is 0, I named it theta=0. Now on each of the item, I need to calculate the probability of this candidate correctly answer on each of the time, how should I edit the following macro sas code to make it work?
proc import datafile="\bpar.csv" dbms=csv out=bpar replace; run;
%macro f1;
do i=1 to 150; /*from item 1 to item 150*/
prob &i= exp(theta-bpar&i)/(1+exp(theta-bpar&i); /*1 parameter logistic regression model*/
end;
%mend;
%f1;