This example also uses the American Quality of Life Survey data introduced in Example 65.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 65.5.1.
proc irt data=IrtUni out=IrtScore; var item1-item8; run; proc print data=IrtScore(obs=5); run;
Output 65.5.1: Factor Scores for the First Five Observations
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 65.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 65.5.2: Factor Scores for the First Five Observations
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.