# The IRT Procedure (Experimental)

### Example 51.3 Multiple-Group Analysis

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 51.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.

```ods graphics on;
proc irt data=IrtGroup;
var item1-item8;
group GroupVar;
model item1-item4/resfunc=twop,
equality item1-item4/parm=[threshold] 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 threshold parameters for `item1` to `item4` between group 1 and group 2:

```item1-item4/parm=[threshold] 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 51.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 51.3.1: Modeling and Group Information

The IRT Procedure

Modeling Information
Data Set WORK.IRTGROUP
Group Variable GroupVar
Number of Items 8
Number of Factors 1
Number of Groups 2
Number of Observations Used 600
Estimation Method Marginal Maximum Likelihood

Group Information
1 272 272
2 328 328

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 51.3.2: Item Information

The IRT Procedure

Item Information
GroupVar = 1
Response
Model
Item Levels Values
TwoP item1 2 0 1
item2 2 0 1
item3 2 0 1
item4 2 0 1
item6 3 1 2 3
item7 3 1 2 3
item8 3 1 2 3

Item Information
GroupVar = 2
Response
Model
Item Levels Values
TwoP item1 2 0 1
item2 2 0 1
item3 2 0 1
item4 2 0 1
item6 3 1 2 3
item7 3 1 2 3
item8 3 1 2 3

Output 51.3.3 includes Item Parameter Estimates tables for both groups. You can see that the threshold 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 51.3.3: Parameter Estimates

The IRT Procedure

Item Parameter Estimates
GroupVar = 1
Response
Model
Item Parameter Estimate Standard
Error
Pr > |t|
TwoP item1 Threshold 0.46576 0.12621 0.0001
Slope 1.89172 0.37451 <.0001
item2 Threshold 0.99281 0.14612 <.0001
Slope 2.00168 0.37927 <.0001
item3 Threshold 0.58361 0.11338 <.0001
Slope 1.40256 0.26908 <.0001
item4 Threshold 0.52395 0.09942 <.0001
Slope 0.90526 0.20197 <.0001
Graded item5 Threshold -0.68454 0.14625 <.0001
Slope 0.96017 0.10850 <.0001
item6 Threshold 1 -0.15106 0.14036 0.1409
Threshold 2 1.36929 0.16499 <.0001
Slope 0.96017 0.10850 <.0001
item7 Threshold 1 -0.83041 0.14738 <.0001
Threshold 2 0.78313 0.14795 <.0001
Slope 0.96017 0.10850 <.0001
item8 Threshold 1 -1.19207 0.15652 <.0001
Threshold 2 0.36192 0.14164 0.0053
Slope 0.96017 0.10850 <.0001

Item Parameter Estimates
GroupVar = 2
Response
Model
Item Parameter Estimate Standard
Error
Pr > |t|
TwoP item1 Threshold 0.46576 0.12621 0.0001
Slope 1.45184 0.28562 <.0001
item2 Threshold 0.99281 0.14612 <.0001
Slope 1.44129 0.28562 <.0001
item3 Threshold 0.58361 0.11338 <.0001
Slope 1.13233 0.22763 <.0001
item4 Threshold 0.52395 0.09942 <.0001
Slope 0.84753 0.18932 <.0001
Graded item5 Threshold -0.62236 0.12734 <.0001
Slope 0.68611 0.17588 <.0001
item6 Threshold 1 -0.42093 0.11938 0.0002
Threshold 2 1.19576 0.13824 <.0001
Slope 0.54028 0.14315 <.0001
item7 Threshold 1 -0.87623 0.14421 <.0001
Threshold 2 0.83851 0.14456 <.0001
Slope 1.03852 0.18993 <.0001
item8 Threshold 1 -1.36954 0.16812 <.0001
Threshold 2 0.23108 0.13743 0.0463
Slope 1.15470 0.21092 <.0001