The IRT Procedure

Example 66.3 Multiple-Group Analysis

(View the complete code for this example.)

This example shows how to use the IRT procedure to do multiple-group analysis. The following DATA step creates the data set IrtGroup:

data IrtGroup;
   input item1-item8 GroupVar @@;
   datalines;
1 0 0 0 1 1 2 1 2 1 1 1 1 1 3 3 3 1 0 1 0 0 1 1 1 1 1 1 0 0 1 0 1 2 3
2 0 0 0 0 0 1 1 1 1 1 0 0 1 0 1 3 3 1 0 0 0 0 0 1 1 3 2 0 0 1 0 0 1 2
2 1 0 1 0 0 1 1 1 2 1 0 0 0 0 0 2 2 3 1 0 1 0 1 0 2 3 3 2 0 0 1 0 1 1
2 3 1 1 1 1 1 1 2 2 3 2 0 0 0 0 1 1 2 2 1 1 0 1 1 1 2 3 3 2 0 1 0 0 1
1 2 3 2 1 0 1 1 1 2 3 3 2 0 1 0 1 1 3 2 3 2 1 1 1 0 0 1 3 3 1 1 1 0 0
1 2 3 3 2 0 1 1 1 1 1 2 1 2 1 0 0 1 1 3 1 1 2 1 0 0 0 1 1 1 3 2 0 0 0
0 1 1 3 3 1 0 0 0 0 0 1 1 1 2 1 0 0 0 0 1 3 3 2 1 1 0 1 1 3 1 1 1 1 0
1 1 1 1 3 1 2 1 1 1 1 1 2 3 2 2 0 0 1 0 0 2 2 2 1 0 0 1 0 1 1 2 3 2 1

   ... more lines ...   

1 0 0 2 1 3 2 1 1 1 1 1 1 3 2 1 1 1 1 0 0 3 3 1 2 1 0 0 1 1 3 3 3 2 0
0 1 0 0 1 1 1 2 0 0 0 0 1 3 1 1 2 1 0 0 1 0 1 3 3 2 0 0 1 1 0 2 2 3 2
1 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 2 0 0 1 1 0 1 1 3 2 0 0 0 0 1 1 1 1
2 0 0 1 0 0 1 1 1 1
;

To set up a multiple-group IRT model, you need to specify the grouping variable by using the GROUP statement. Very often you also want to specify cross-group equality constraints for different parameters. You can accomplish this by using the EQUALITY statement.

The model that is specified in the following statements is an extension of the model in Example 66.1. The group variable, GroupVar, is specified in the GROUP statement. It has two values, 1 and 2, to indicate group membership. Equality constraints are specified in the EQUALITY statement.

proc irt data=IrtGroup;
   var item1-item8;
   group GroupVar;
   model item1-item4/resfunc=twop,
         item5-item8/resfunc=graded;
   equality item1-item4/parm=[intercept] between_gp=[1 2],
            _allgr_/parm=[slope] within_gp=[1];
run;

Two different sets of equality constraints have been specified. The first entry specifies equality constraints on the intercept parameters for item1 to item4 between group 1 and group 2:

item1-item4/parm=[intercept] between_gp=[1 2]

Notice that 1 and 2 are the actual values for the group variable GroupVar. The second entry specifies equality constraints on the slope parameters for all the graded response items within group 1:

_allgr_/parm=[slope] within_gp=[1]

Output 66.3.1 shows the "Modeling Information" table and the "Group Information" table for this example. For multiple-group analysis, the "Modeling Information" table contains two extra pieces of information: the group variable and the number of groups. The "Group Information" table contains information about the data for each group. There are 272 observations that have been read and used for group 1; this number for group 2 is 328.

Output 66.3.1: Modeling and Group Information

The IRT Procedure

Modeling Information
Data SetWORK.IRTGROUP
Group VariableGroupVar
Link FunctionLogit
Number of Items8
Number of Factors1
Number of Groups2
Number of Observations Read600
Number of Observations Used600
Estimation MethodMarginal Maximum Likelihood

Group Information
GroupVarNobs
Read
Nobs
Used
1272272
2328328


Because there are two groups in this example, the IRT procedure produces two "Item Information" tables. For this example, these two tables contain the same information. That means that all the items have the same levels for the two groups. It is possible that the same item might have different numbers of levels, or maybe the same number of levels but different values. For example, an item has four levels, from 1 to 4, but one group might observe only levels 1 and 2, and the other group might observe only levels 3 and 4.

Output 66.3.2: Item Information

The IRT Procedure

Item Information
GroupVar = 1
Response
Model
ItemLevelsValues
TwoPitem120 1
 item220 1
 item320 1
 item420 1
Gradeditem520 1
 item631 2 3
 item731 2 3
 item831 2 3

Item Information
GroupVar = 2
Response
Model
ItemLevelsValues
TwoPitem120 1
 item220 1
 item320 1
 item420 1
Gradeditem520 1
 item631 2 3
 item731 2 3
 item831 2 3


Output 66.3.3 includes "Item Parameter Estimates" tables for both groups. You can see that the intercept parameters for item1 are the same for both groups. The same applies to item2 to item4. You can also see that the slope parameters have the same value for item5 to item8 in group 1. These results suggest that equality constraints that are specified in the EQUALITY statement have been fulfilled.

Output 66.3.3: Parameter Estimates

The IRT Procedure

Item Parameter Estimates
GroupVar = 1
Response
Model
ItemParameterEstimateStandard
Error
Pr > |t|
TwoPitem1Difficulty0.246240.078160.0008
  Slope1.891460.37443<.0001
 item2Difficulty0.495910.10121<.0001
  Slope2.001900.37931<.0001
 item3Difficulty0.416000.10696<.0001
  Slope1.402970.26917<.0001
 item4Difficulty0.578750.162060.0002
  Slope0.905210.20197<.0001
Gradeditem5Threshold-0.713060.16162<.0001
  Slope0.960220.10851<.0001
 item6Threshold 1-0.157380.146940.1421
  Threshold 21.426080.21480<.0001
  Slope0.960220.10851<.0001
 item7Threshold 1-0.864910.16877<.0001
  Threshold 20.815510.17162<.0001
  Slope0.960220.10851<.0001
 item8Threshold 1-1.241530.19175<.0001
  Threshold 20.376860.152110.0066
  Slope0.960220.10851<.0001

Item Parameter Estimates
GroupVar = 2
Response
Model
ItemParameterEstimateStandard
Error
Pr > |t|
TwoPitem1Difficulty0.320860.093400.0003
  Slope1.451590.28556<.0001
 item2Difficulty0.688950.12796<.0001
  Slope1.440990.28556<.0001
 item3Difficulty0.515340.12286<.0001
  Slope1.132530.22767<.0001
 item4Difficulty0.618100.16239<.0001
  Slope0.847570.18933<.0001
Gradeditem5Threshold-0.907080.273880.0005
  Slope0.686200.17589<.0001
 item6Threshold 1-0.779530.299410.0046
  Threshold 22.214120.57510<.0001
  Slope0.540010.14313<.0001
 item7Threshold 1-0.843820.18252<.0001
  Threshold 20.807480.16758<.0001
  Slope1.038410.18991<.0001
 item8Threshold 1-1.185950.20728<.0001
  Threshold 20.200220.120310.0480
  Slope1.154760.21093<.0001