Giter VIP home page Giter VIP logo

ggmirt's Introduction

ggmirt

Lifecycle: experimental CRAN status

This package extends the great R-package mirt (Multidimensional item response theory; Chalmers, 2021) with functions for creating publication-ready and customizable figures. Although the mirt-packages already includes possibilities to plot various aspects relevant to understanding IRT analyses (e.g., item plots, trace-plots, etc.), it does not employ ggplot2, which provides more flexibility and customizability. This package provides some functions to recreate such plots with ggplot2.

If you want to learn how to use mirt in combination with ggmirt to run various IRT analyses, please check out the following tutorials:

Please note: This package is still under development. It is currently rather a place where I dump some functions that I use often, but I have not fully tested them under different scenarios and with different type of models. If you are interested in contributing, feel free to reach out.

Installation

# install.packages("devtools")
devtools::install_github("masurp/ggmirt")

Usage

# Load packages
library(mirt)
library(ggmirt)

# Simulate some data
data <- sim_irt(500, 8, seed = 123)

# Run IRT model with mirt
mod <- mirt(data, 1, itemtype = "2PL", verbose = FALSE)

# Plot item-person map
itempersonMap(mod)

# Item characteristic curves
tracePlot(mod, data)

# Item information curves
itemInfoPlot(mod, data)

# Scale characteristic curve
scaleCharPlot(mod)

# Test information curves
testInfoPlot(mod, adj_factor = 1.75)

# Item infit and outfit statistics
itemfitPlot(mod)

# Person fit statisitcs
personfitPlot(mod)

# Conditional reliability
conRelPlot(mod)

Next to individual plot functions, there is also a comprehensive summaryPlot()-function, which provides a lot of information about IRT models with just a line of code.

summaryPlot(mod, adj_factor = 1.75)

How to cite this package

citation("ggmirt")
#> 
#> To cite package 'ggmirt' in publications use:
#> 
#>   Philipp K. Masur (2022). ggmirt: Plotting functions to extend "mirt"
#>   for IRT analyses. R package version 0.1.0.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {ggmirt: Plotting functions to extend "mirt" for IRT analyses},
#>     author = {Philipp K. Masur},
#>     year = {2022},
#>     note = {R package version 0.1.0},
#>   }

ggmirt's People

Contributors

masurp avatar jakub-jedrusiak avatar stats-matt avatar haozhou1988 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.