The IRT Procedure

Example 66.5 Subject Scoring

(View the complete code for this example.)

This example also uses the American Quality of Life Survey data introduced in Example 66.1. The purpose of this example is to show you how to score subjects. You can score subjects in two different ways by using the IRT procedure. If you want to fit the model and score the subjects simultaneously, you simply use the OUT= option in the PROC IRT statement. The following statements fit an IRT model to the data set IrtUni and then score all the subjects in that data set based on the parameter estimates. Factor scores along with the original data in IrtUni are saved to a SAS data set called IrtScore. The first five observations in the OUT= data set are displayed in Output 66.5.1.

proc irt data=IrtUni out=IrtScore;
   var item1-item8;
run;

proc print data=IrtScore(obs=5);
run;

Output 66.5.1: Factor Scores for the First Five Observations

Obsitem1item2item3item4item5item6item7item8_Factor1
110001121-0.38037
2111113331.69157
301001111-0.72592
4100101230.12299
500000111-1.59046


In applied research, it is not uncommon to want to save the parameter estimates (or item calibration result) and use them later to score new subjects without refitting the model. To accomplish this task, first you use the OUTMODEL= option in the PROC IRT statement to save the parameter estimates as follows:

proc irt data=CalData outmodel=IrtModel;
   var item1-item8;
run;

In the preceding statements, the data set CalData contains 500 random samples from the original data set IrtUni.

Then you use the following statements to score new subjects in the data set that is specified in the DATA= option, where the data set NewSub contains 50 random samples from the IrtUni data set. In the following statements, you use the INMODEL= option in the PROC IRT statement to input the model specification and parameter estimates from a previous analysis. To score the subjects without refitting the model, you also need to specify the SCORE suboption. Output 66.5.2 contains the first five observations in the OUT= data set.

proc irt data=NewSub inmodel(score)=IrtModel out=IrtScore2;
run;

proc print data=IrtScore2 (obs=5);
run;

Output 66.5.2: Factor Scores for the First Five Observations

ObsReplicateitem1item2item3item4item5item6item7item8_Factor1
11111112231.14795
21101111310.45942
31111112321.11387
41111111120.56330
5100001223-0.20237


If you do not specify the SCORE suboption, PROC IRT uses the parameter values specified in the INMODEL= option as initial values, refits the model, and then uses the new parameter estimates to score the subjects.