The IRT Procedure

Getting Started: IRT Procedure

(View the complete code for this example.)

This example shows how you can use all default settings in PROC IRT to fit an item response model. In this example, there are 50 subjects and each subject responds to 10 items. These 10 items have binary responses: 1 indicates correct and 0 indicates incorrect.

The following DATA step creates the SAS data set IrtBinary:

data IrtBinary;
   input item1-item10 @@;
   datalines;
1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 0 1 0 0 1 1 1 1 1 1
0 0 0 0 0 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1

   ... more lines ...   

1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1
;

The following statements fit an IRT model:

proc irt data=IrtBinary;
   var item1-item10;
run;

The PROC IRT statement invokes the procedure, and the DATA= option specifies the input data set IrtBinary. The VAR statement names the variables to be used in the model. As you can see from the syntax in this example, fitting a IRT model can be very simple when you use the default settings. These default settings are chosen to reflect setups that are common in practice. Some of the important default settings follow:

  • The number of factors is 1.

  • The two-parameter logistic model is assumed for binary variables, and the graded response model is assumed for ordinal variables.

  • The link function is logistic link.

  • The estimation method is based on marginal likelihood.

  • The optimization method is the quasi-Newton algorithm.

  • The quadrature method is adaptive Gauss-Hermite quadrature, in which the number of quadrature points per dimension is determined adaptively.

As a result, the preceding statements fit two-parameter logistic (2PL) models for all the variables that are listed in the VAR statement.

The first table that PROC IRT produces is the "Modeling Information" table, as shown in Figure 66.1. This table displays basic information about the analysis, such as the name of the input data set, the link function, the number of items and factors, the number of observations, and the estimation method. You can change the link function by using the LINK= option in the PROC IRT statement. You can change the response model for all the items by using the RESFUNC= option in the PROC IRT statement. You can specify different response functions or models for different set of variables by including a MODEL statement. If you want to do multidimensional exploratory analysis, you can simply change the number of factors by using the NFACTOR= option in the PROC IRT statement. For confirmatory analysis, you can use the FACTOR statement to specify the confirmatory factor pattern; the number of factors is implicitly defined by the number of distinctive factor names that you specify in the FACTOR statement.

Figure 66.1: Model Information

The IRT Procedure

Modeling Information
Data SetWORK.IRTBINARY
Link FunctionLogit
Response ModelTwo Parameter Model
Number of Items10
Number of Factors1
Number of Observations Read100
Number of Observations Used100
Estimation MethodMarginal Maximum Likelihood


The "Item Information" table, shown in Figure 66.2, is displayed by default and can be used to check the item-level information. In this case, each of the 10 variables has two levels, and the raw values for these two levels are 0 and 1, respectively.

Figure 66.2: Item Information

Item Information
ItemLevelsValues
item120 1
item220 1
item320 1
item420 1
item520 1
item620 1
item720 1
item820 1
item920 1
item1020 1


The eigenvalues of polychoric correlations are also computed by default and are shown in Figure 66.3. You can use the information from these eigenvalues to assess a reasonable range for the number of factors. For this example, you can observe that the first eigenvalue accounts for almost of the variance, which suggests that there is only one dominant eigenvalue and that a unidimensional model is reasonable for this example. To produce the polychoric correlation table, you specify the POLYCHORIC option in the PROC IRT statement.

Figure 66.3: Eigenvalues of Polychoric Correlation

Eigenvalues of the Polychoric Correlation Matrix
 EigenvalueDifferenceProportionCumulative
14.711051773.511494530.47110.4711
21.199557230.141835020.12000.5911
31.057722210.265777350.10580.6968
40.791944860.072045490.07920.7760
50.719899380.177824910.07200.8480
60.542074460.127136640.05420.9022
70.414937820.106317700.04150.9437
80.308620120.122561830.03090.9746
90.186058290.117924440.01860.9932
100.06813385 0.00681.0000


Next, the "Optimization Information" table, shown in Figure 66.4, lists the optimization technique, the numeric quadrature method, and the number of quadrature points per dimension. If you want to use the expectation-maximization (EM) technique, specify TECHNIQUE=EM in the PROC IRT statement. If you specify the NOAD option in the PROC IRT statement, PROC IRT uses the nonadaptive Gauss-Hermite quadrature to approximate the likelihood. You can change the number of quadrature points by specifying the QPOINTS= option in the PROC IRT statement.

Figure 66.4: Optimization Information

Optimization Information
Optimization TechniqueQuasi-Newton
Likelihood ApproximationAdaptive Gauss-Hermite Quadrature
Number of Quadrature Points21
Number of Free Parameters20


Figure 66.5 shows the "Iteration History" table. For each iteration, the table displays the current iteration number, number of function evaluations, objective function value, change of object function value, and maximum value of gradients. You can use this information to monitor the estimation status of the model. You can turn off the display of the "Iteration History" table by specifying the NOITPRINT option in the PROC IRT statement.

Following the "Iteration History" table is the convergence status table, shown in Figure 66.6. It shows whether the optimization algorithm converges successfully or not. You should make sure that the optimization converges successfully before you try to interpret the estimation results.

Figure 66.5: Iteration History

Iteration History
CyclesIterationEvaluationsObjective
Function
Function
Change
Max Abs
Gradient
0025.53444506 0.045818
0145.43305912-0.101385940.017751
0265.41425139-0.018807730.016637
0385.40300779-0.011243600.008948
04105.40151894-0.001488850.006556
05125.40100096-0.000517980.002865
06155.40087882-0.000122140.001574
07185.40082176-0.000057070.000885
08215.40079448-0.000027280.000486
09245.40078766-0.000006820.000337
010275.40078296-0.000004700.000185
011305.40078215-0.000000810.000103
012325.40078180-0.000000340.000157
013345.40078145-0.000000360.000037
014375.40078142-0.000000030.000038
015405.40078141-0.000000010.000012
1025.40078179 0.000012
1145.40078179-0.000000008.953E-6


Figure 66.6: Convergence Status

Convergence criterion (GCONV=.000000010) satisfied.


Next is the "Model Fit Statistics" table, shown in Figure 66.7, which includes the log likelihood, Akaike’s information criterion (AIC), and the Bayesian information criterion (BIC). If all the response patterns are observed, Pearson’s chi-square and likelihood ratio chi-square statistics are also included in this table. Because some of the response patterns in this example are not observed, the Pearson’s chi-square statistic is not included in the table.

Figure 66.7: Fit Statistics

Model Fit Statistics
Log Likelihood-540.0781788
AIC (Smaller is Better)1120.1563577
BIC (Smaller is Better)1172.2597614
LR Chi-Square300.35009224
LR Chi-Square DF1003


Finally, the "Item Parameter Estimates" table, shown in Figure 66.8, includes parameter estimates, standard errors, and p-values. Parameters are organized and displayed within each item. The items are listed in the order of their appearance in the modeling statements. For each item, there are two parameters: difficulty and slope. Difficulty parameters measure the difficulties of the items. As the value of the difficulty parameter increases, the item becomes more difficult. In Figure 66.8, you can observe that all the difficulty parameters are less than 0, which suggests that all the items in this example are relatively easy. The slope parameter values for this example range from 0.94 to 2.33, suggesting that all the items are adequate measures of the latent trait.

Figure 66.8: Parameter Estimates

Item Parameter Estimates
ItemParameterEstimateStandard
Error
Pr > |t|
item1Difficulty-0.865750.20048<.0001
 Slope2.220000.684020.0006
item2Difficulty-1.016240.21352<.0001
 Slope2.339030.761120.0011
item3Difficulty-0.911230.20824<.0001
 Slope2.186570.683380.0007
item4Difficulty-0.923880.22607<.0001
 Slope1.873020.575330.0006
item5Difficulty-1.092190.304700.0002
 Slope1.339310.427680.0009
item6Difficulty-0.488070.241900.0218
 Slope1.176770.371110.0008
item7Difficulty-0.617620.299880.0197
 Slope0.945530.326520.0019
item8Difficulty-0.508100.282950.0363
 Slope0.956600.329830.0019
item9Difficulty-0.411120.243090.0454
 Slope1.117330.356660.0009
item10Difficulty-0.623160.278290.0126
 Slope1.052150.349650.0013