How to run IRT analyses in R









31 thoughts on “How to run IRT analyses in R”

  1. Mehrdad Vossoughi

    Dear Sir’
    I really appreciate you for this valuable page. I found it very useful, and I want to know whether you have another course on IRT for Likert items?
    Sincerely yours,
    Mehrdad Vossoughi
    PhD in Biostatistics

  2. Hi Philipp,

    Thank you for this very detailed and well-structured post.

    I just wanted to let you know that this post made my life considerably easier. Hope you’ll keep up posting such great content!

    Best,
    Bogdan

  3. Dear Philipp,

    I get the message:

    Warning: The “ argument of `guides()` cannot be `FALSE`. Use “none” instead as
    of ggplot2 3.3.4.

    Could you please assist with rectifying this?

  4. Dear Philipp,

    Thank you for an excellent introduction to IRT and making ggmirt available.

    I am also receiving the following message when I run your code:

    Warning: Returning more (or less) than 1 row per `summarise()` group was deprecated in
    dplyr 1.1.0.
    ℹ Please use `reframe()` instead.
    ℹ When switching from `summarise()` to `reframe()`, remember that `reframe()`
    always returns an ungrouped data frame and adjust accordingly.

    Could you please assist with fixing this?

  5. I find it interesting that IRT models offer advantages such as computer adaptive testing and can be used to develop smaller scales or parallel tests while still maintaining high validity and reliability. How do these advantages translate into practical applications in the social sciences?

    1. Well, particularly if a scale is very large, we may often not have the space to put them fully into questionnaires. Adaptive testing may then allow to still assess the latent trait/ability/concept without sacrificing too much space.

      Parallel testing on the other hand is particularly important for pre-post experimental designs (e.g., intervention studies). How would you otherwise minimize learning effects?

      Just some thoughts! 😉

  6. Hello, thanks for this great resource. Everything works fine and is exactly what I was looking for.

    I just have one question.
    Within the traceplot function, is there a way to relabel the items? E.g it says item 1, item 2, etc. Instead I would like to use ‘Q10’, ‘Q11″ as label. Or can it use the naming it uses in the coef(fit1PL) function? Is this possible?

    Thanks for your help.

  7. Hello, thanks for this clear and interesting manual. But I have a question: is it possible to recalibrate person latent scores into a specified range (like 0_10) in simple rasch model (and how)?

  8. Really appreciate excellent works that you have made. Is it possible to arrange the item in the order form for the case we generate ICC and IIF through tracePlot(fit3PL) and itemInfoPlot(fit3PL, facet = T), respectively?

  9. Really appreciate excellent works that you have made. Is it possible to arrange the item in the order form when we want to generate ICC and IIF by using tracePlot(fit3PL) and itemInfoPlot(fit3PL, facet = T), respectively?

  10. Thank you for such a helpful tutorial. And especially like that your functions are compatible with ggplot2! I was able to use your code today to easily customize my plots for my current project!

  11. Hi Phillip,
    Any advice on choosing the optimizer in mirt()? There are many, how one can decide on using the right one? Pros and cons?
    Any advice is higly appreciated!
    Thank you!

    1. Hi Alda,

      this is really a too big of a question to simply point to some resource or summarize the pros and cons. I would suggest to start in the ‘mirt’ manual (there is a small section on what type of optimizers exists under the main function, including some recommendations for when to use which) and then start searching for the relevant literature. I would even say that the default will work in most cases, but changing to other optimizers is really very specific to the study and model in question.

      Best,
      Philipp

  12. I find this page intriguing and beneficial. Could you please provide an interpretation of the output from comparing models? This would enhance clarity for me.

  13. > subset1 %
    + select(V2, V10, V3, V4, V7)
    Error in select(., V2, V10, V3, V4, V7) :
    unused arguments (V2, V10, V3, V4, V7)

  14. Dear Philipp, Great primer. Thanks loads. RStudio advised posting this warning message to you after running the simulation code:
    d <- sim_irt(500, 10, discrimination = .25, seed = 42).

    Warning message:
    The `x` argument of `as_tibble.matrix()` must have unique column names if `.name_repair` is omitted as of tibble
    2.0.0.
    ℹ Using compatibility `.name_repair`.
    ℹ The deprecated feature was likely used in the ggmirt package. Please report the issue to the authors.

    so done.
    Many thanks, once more!
    Emma

  15. Hi there, thank you for this tutorial. Can you give me some advice on what to do if I want to fit a model with a dataframe that has some likert items and some dichotomous items. Is it possible to have one MIRT model with some items graded and some as 3PL? If not, is it suitable to do two separate models and compare the F values, a-parameters etc? Thank you!

  16. Pingback: Adverse childhood experiences among black sexually minoritized men and Black transgender women in Chicago | International Journal for Equity in Health – Indexed Journals

  17. Thank you very much.
    The information and R codes were quite helpful.
    I was however not able to load ggmirt. Is it related to a particular version of R?

  18. Dear Dr. Masur,
    Thank you very much indeed, for this introduction, I find it really helpful.
    However, I have the following question: I have a dichotomous data set thta looks okay (no missing data, row sums and col sums all >0, and there is a broad distribution of values in both cases), yet the mirt() function returns the same error message for any model:

    Error in min(s, na.rm = TRUE):max(x, na.rm = TRUE) :
    result would be too long a vector

    How can I find out what the problem is with an IRT dataset?
    Thanks very much!
    Zoltan

  19. Abiy Kefyalew Aboret

    The fit statistics indicate that the item aligns with the model, yet the item characteristic curve suggests it is behaving in the opposite manner. How can we interpret this?

Leave a Reply

Your email address will not be published.