Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to Calculate Total Information between 2 values of Theta in IRT Graded Response Model?

    I am seeking a way to calculate the total amount of information and the total amount of information between two specified values of Theta in a Graded Response Model from IRT.

    Consider the following partial example of an IRT graded response model (GRM) from Example 2, p. 79, in the Stata 15 irt.pdf manual.
    Code:
    use http://www.stata-press.com/data/r15/charity, clear
    
    irt grm ta1-ta5
    irtgraph iif, legend(pos(11) col(1) ring(0)) name(iif, replace)
    irtgraph tif, se name(tif, replace)
    I would like to know how to calculate the amount of information in the range -2.0 < Theta < 2.0.

    In R, this can be done with code such as the following:
    Code:
    Call:
    grm(data = dt)
    
    Total Information = 107.08
    Information in (-2, 2) = 77.79 (72.64%)
    Based on all the items
    Is there a way to calculate in Stata versions 14 or 15 the total amount of information and the amount of information between two specified Theta values?

    Thanks in advance for any advice.

    Red Owl
    (Stata/IC 15.0)

    ** Edited to correct error in page number of Example 2.
    Last edited by Red Owl; 26 Jul 2017, 15:29.

  • #2
    At the time being irt does not have built-in functionality to calculate the amount of information, but we can do it by hand. I illustrate by using irtgraph tif but the process is similar for irtgraph iif.

    First, I fit a graded response model and use irtgraph tif with option data() to save the plot data to a file. We will be approximating the integral using the rectangle method so I use option n() to increase the number of points at which the information function is evaluated and option range() to make sure the curve covers the range where the information function goes to zero.

    Code:
    webuse charity, clear
    irt grm ta1-ta5
    irtgraph tif, name(tif, replace) range(-10 10) n(10000) data(mydata,replace)
    The mydata dataset contains variable tif, which records test information at values stored in variable theta. You can think of the values in tif as the height of a rectangle. To approximate the integral, we also need the rectangle width, which is given by the difference between any two adjacent theta values. The formula for the test information function in irtgraph tif includes the variance of the latent trait, which is always equal to 1, so I subtract 1 from tif before I calculate the area of the rectangles.

    Code:
    local h = theta[_N] - theta[_N-1]
    gen double area = (tif-1)*`h'
    Now all that is left is to add up the areas over the range of interest.

    Code:
    egen double area_all = sum(area)
    egen double area_22 = sum(area) if theta > -2 & theta < 2
    su area_all
    local a_all = r(mean)
    su area_22
    local a_22 = r(mean)
    local pc = `a_22' / `a_all' * 100
    di "Total information = " %4.2f `a_all'
    di "Information in (-2, 2) = " %4.2f `a_22' " (" %4.2f `pc' "%)"
    The output of the last two lines is

    Code:
    Total information = 16.13
    Information in (-2, 2) = 10.10 (62.58%)
    Here is R code for comparison.
    Code:
    > mm = grm(data=charity)
    > mm
    
    Call:
    grm(data = charity)
    
    Coefficients:
         Extrmt1  Extrmt2  Extrmt3  Dscrmn
    ta1   -1.540    1.296    3.305   0.908
    ta2   -1.661    0.007    2.531   0.944
    ta3   -1.080    1.017    2.232   1.734
    ta4   -0.344    1.466    2.419   1.933
    ta5   -0.855    0.681    2.074   1.428
    
    Log.Lik: -5159.276
    
    > information(mm,c(-2,2))
    
    Call:
    grm(data = dat)
    
    Total Information = 16.13
    Information in (-2, 2) = 10.1 (62.58%)
    Based on all the items

    Comment


    • #3
      Thanks so much, Rafal.

      That's very helpful.

      Comment

      Working...
      X