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;
Hello @CarsonGrey and welcome to the SAS Support Communities!
Please see @Reeza's reply to @superbug's identical question, posted three days ago: https://communities.sas.com/t5/SAS-Programming/how-to-write-code-for-1-parameter-logistic-model/m-p/...
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.