/***************************************************************************/; /***************************************************************************/; /** **/; /** Adaptive Testing Simulation **/; /** **/; /** SIMTAO 1.1 **/; /** **/; /** Coded by Gilles Raîche **/; /** Raiche.Gilles@uqam.ca **/; /** **/; /** Université du Québec à Montréal **/; /** Faculté des sciences de l’éducation **/; /** Département d’éducation et pédagogie **/; /** **/; /** Montréal, QUÉBEC, CANADA **/; /** **/; /** April 2005 **/; /** **/; /***************************************************************************/; /***************************************************************************/; Options replace nodate pageno=1 pagesize=256 nosource nonotes nomtrace nomlogic nomprint; /* Constant Initialisation *************************************************/; %Let nitem=10 ;/* Item Number */; %Let qpoint=20 ;/* Quadrature Points */; %Let D=1.702 ;/* Haley’s Constant */; %Let thetamin=-4;/* Inferior EAP Limit of Integration */; %Let thetamax= 4;/* Superior EAP Limit of Integration */; %Let bayes=0 ;/* A Priori Proficiency Level */; %Let sujet=100 ;/* Subject number */; %Let minhab= -3 ;/* Minimum Proficiency level */; %Let maxhab= 3 ;/* Maximum Proficiency level */; %Let byhab= 1 ;/* By Steps of ... */; %Let aap=0 ;/* A Priori Adaptive Estimation Method (NO=0;YES=1) */; %Let acb=0 ;/* Adaptive Bock and Milslevy Bias Correction(NO=0;YES=1)*/; %Let fcb=0 ;/* Final Bock and Milslevy Bias Correction (NO=0;YES=1) */; %Let ain=0 ;/* Adaptive integration Interval (NO=0;YES=1) */; /* *************************************************************************/; TITLE1 "ADAPTIVE TEST SIMULATION (n=&SUJET)"; TITLE2 "(ADAPTIVE ESTIMATION : AAP=&AAP, AIN=&AIN, ACB=&ACB, FCB=&FCB)"; %Macro Prior (Theta,mu); %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; %* A priori Probability Function N(mu,1) used by Bock and Mislevy (1982) *; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; %* Local Variables: theta, mu *; %* Global Variables: step *; %* Function Call : none *; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; Probnorm(&Theta-&mu + step/2) - Probnorm(&Theta-&mu - step/2);; %Mend; %Macro logist (Theta,b,D,r); %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; %* One Parameter Logistic Function *; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; %* Local Variables: theta, b, r *; %* Global Variables: D *; %* Function Call : none *; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; ((((1+exp(-&D*(&Theta-&b)))**-1))**&r) * (1-(((1+exp(-&D*(&Theta-&b)))**-1)))**(1-&r); %Mend; %Macro Reponse (i,habilete); %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; %* Random Item Response according to the Generating Proficiency Level *; %* Method Used by Harwell, Stone, Hsu and Kirisci (1996) *; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; %* Local Variables: i, habilete *; %* Global Variables: D, b *; %* Function Call : none *; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; plog= exp(&D*(&habilete-b{&i})) / (1+exp(&D*(&habilete-b{&i}))); puni=ranuni(1); r{&i}=plog > puni; %Mend; %Macro step; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; %* Class Width According to Quadrature Point Number and to a priori *; %* Function Sum Surface on the interval Thetamin … Thetamax *; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; %* Local Variables: surface, j *; %* Global Variables: step, thetamax, thetamin, qpoint *; %* Function Call : prior *; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; surface=0; Do j=1 to &nitem; %* Class Width According to Quadrature Point Number ..................; step=(&thetamax-&thetamin)/(&qpoint-1); end; %* A priori Function Sum Surface .........................................; Do theta=&thetamin to &thetamax by step; surface=surface + %Prior(theta,0); end; %* Put "surface = " surface; *; %Mend; %Macro MU2(habilete); %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; %* Moment Estimation by EAP method *; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; %* Local Variables: b1,j,num,p,lnp,i,logist,prior *; %* Global Variables: nitem,habilete,thetamin,thetamax,step,theta,b,D,r *; %* bayes,te,denom *; %* Function Call : reponse,logist,prior *; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; %* Difficulty Parameter of the First Item ................................; b1=0; %* Numerators and Denominators Initialisation to 0, ....................; %* Like the A Priori Proficiency Level Estimate ...........................; Do j=1 to &nitem; num(j)=0;denom(j)=0;bayes(j)=&bayes; num2_(j)=0;num3_(j)=0;num4_(j)=0; end; %* j Proficiency Level Estimation ....................................; Do j=1 to &nitem; %* Begin Level 1 .; %* Adaptive Parameters for Numeric Integration ..................; ain=0;If &ain=1 then do; ain=b(j); end; %Reponse(j,&habilete); %* A Posteriori Proficiency level Expectation .............; Do theta=(&thetamin+ain) to (&thetamax+ain) by step; %* Begin Level 2 .; p=1;lnp=log(p); Do i=1 to j; %* Begin Level 3 .; logist=%logist(theta,b(i),&D,r(i)); lnp=lnp+log(logist); end; %* End Level 3 .; if j>1 then do; prior=%prior(theta,bayes(j-1));end; if j=1 then do; prior=%prior(theta,&bayes);end; num(j)=num(j)+ (theta)*exp(lnp+log(prior)); denom(j)=denom(j)+ exp(lnp+log(prior)); end; %* End Level 2 .; %* jth Proficiency level Estimation ...............................; te(j)=num(j)/denom(j); Do theta=(&thetamin+ain) to (&thetamax+ain) by step; %* Begin Level 2 .; p=1;lnp=log(p); Do i=1 to j; %* Begin Level 3 .; logist=%logist(theta,b(i),&D,r(i)); lnp=lnp+log(logist); end; %* End Level 3 .; if j>1 then do; prior=%prior(theta,bayes(j-1));end; if j=1 then do; prior=%prior(theta,&bayes);end; num2_(j)=num2_(j)+((theta-te(j))**2) *exp(lnp+log(prior)); num3_(j)=num3_(j)+((theta-te(j))**3) *exp(lnp+log(prior)); num4_(j)=num4_(j)+((theta-te(j))**4) *exp(lnp+log(prior)); end; %* End Level 2 .; %* jth Standard Error Estimation of proficiency level ..............; se(j)=(num2_(j)/denom(j))**.5; %* jth Skewness Coefficient Estimation .................................; as(j)=(num3_(j)/denom(j))/se(j)**3; %* jth Kurtosis Coefficient Estimation .................................; ku(j)=((num4_(j)/denom(j))/se(j)**4)-3; denom(j)=denom(j)/surface; %* Adaptive Correction of the A Posteriori proficiency level ...........; if &acb=1 then do; te(j)=te(j)/(1-(se(j)*se(j))); end; %* Adaptative Estimation of the A Posteriori proficiency level .........; if &aap=1 then do; bayes(j) = te(j);end; if j<&nitem then do; b(j+1) =te(j); end; end; %* End Level 1 .; %Mend; %MACRO SITEM; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; %* Theoretical and empirical values of the Estimators According to *; %* Different Values of the Stopping Rule According to the Number of Item *; %* Administered *; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; %* Local Variables: none *; %* Global Variables: sujet, nitem *; %* Function Call : none *; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; Proc means data=thesd_&nitem noprint; class habilete item; var seo aso kuo; output out=res1 mean(seo)=mseo mean(aso)=maso mean(kuo)=mkuo; run; Proc sort;by habilete item;run; Proc means data=thesd_&nitem noprint; class habilete item; var teo; output out=res2 mean=mteo std=se skewness=as kurtosis=ku; run; Proc sort;by habilete item;run; Data results; merge res1 res2; by habilete item; if (habilete NE "" and item NE ""); run; Proc sort;by habilete;run; Proc print; by habilete; var item mteo se mseo as maso ku mkuo; run; %MEND; %Macro SSEO; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; %* Theoretical and empirical values of the Estimators According to *; %* Different Values of the Stopping Rule According to the *; %* Standard Error of the Proficiency level *; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; %* Local Variables: h, i, j *; %* Global Variables: sujet, nitem, minhab, maxhab, byhab *; %* Function Call : none *; %* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; %DO H=50 %TO 20 %BY -5; %DO I=&minhab %TO &maxhab %BY &byhab; %DO J=1 %TO &SUJET; Data seo40; set thesd_&nitem ; If (habilete=&I and sujet=&J and seo<=(&H/100)) then do; rseo=&H; output seo40; stop; end; Run; Proc datasets nolist; append base=sorti data=seo40;run; %END; %END; %END; Proc means data=sorti noprint; class habilete rseo; var seo aso kuo; output out=res1 mean(seo)=mseo mean(aso)=maso mean(kuo)=mkuo; run; Proc sort;by habilete rseo;run; Proc means data=sorti noprint; class habilete rseo; var teo; output out=res2 mean=mteo std=se skewness=as kurtosis=ku; run; Proc sort;by habilete rseo;run; Data results; merge res1 res2; by habilete rseo; if (habilete NE "" and rseo NE ""); run; Proc sort;by habilete;run; Proc print; by habilete; var rseo se mseo mteo as maso ku mkuo; run; Proc datasets;delete sorti;run; %MEND; Data work.thesd_&nitem; array te[&nitem]; /* Proficiency Level Estimate .................*/; array r[&nitem]; /* Response Vector ........................*/; array b[&nitem]; /* Difficulty Parameters ...................*/; array num[&nitem]; /* Numerator for EAP (MU) ...................*/; array num2_[&nitem]; /* Numerator for EAP (SE) ...................*/; array num3_[&nitem]; /* Numerator for EAP (MC3) ..................*/; array num4_[&nitem]; /* Numerator for EAP (MC4) ..................*/; array denom[&nitem]; /* Denominator for EAP ......................*/; array se[&nitem]; /* Standard Error .............................*/; array as[&nitem]; /* Skewness ..................................*/; array ku[&nitem]; /* Kurtosis ...................................*/; array prc[&nitem]; /* Correct Responses Proportion ..............*/; array bayes[&nitem]; /* A Priori Estimator ........................*/; length default=3 /* Variable Format Storage ............*/; b1=0; /* Difficulty Level Initialisation of b1 ....*/; %STEP; Do sujet = 1 to &sujet; %* Begin Level 1 .; Do habilete = &minhab to &maxhab by &byhab; %* Begin Level 2 .; %MU2(habilete); /* Different Statistics According to the Number of ...............*/; /* Administered Items ...........................................*/; Do item=1 to &nitem; %* Begin Level 3 .; ro=r{item};bo=b{item};teo=te{item};prco=prc{item};baye=bayes{item}; seo=se{item};aso=as{item};kuo=ku{item}; if &fcb=1 then do;teo=teo/(1-seo*seo);end; biais = teo-habilete; Output; end; %* End Level 3 ...; End; %* End Level 2 ...; End; %* End Level 1 ...; Keep sujet item ro bo habilete teo prco seo aso kuo biais baye; run; %SSEO; %SITEM;