Skip to content

A R package for fitting Diagnostic Classification Modeling via Stan

Notifications You must be signed in to change notification settings

JihongZ/StanDCM

Repository files navigation

StanDCM

Travis build status R build status

Overview

StanDCM is a helpful tool of estimating Diagnostic Classification Models (DCM) via Stan

Learning resources

Features of the package

  • Estimating log-linear cognitive diagnosis model (LCDM) and a variety of widely-used models subsumed by the LCDM, including the DINA model, DINO model, additive-CDM (A-CDM), linear logistic model (LLM), reduced reparametrized unified model (RRUM), multiple-strategy DINA model for dichotomous responses
  • Specifying customized prior distributions for parameters
  • Computing can be achieved in parallel environments
  • Estimating models within the LCDM model framework using user-specified design matrix
  • Estimating rating scale DCM for ordinal and nominal responses

Installation

To install this package from source:

  1. Users may need to install the rstan in order to execute the functions of StanDCM package.

  2. Windows users should avoid using space when installing rstan.

  3. After installing rstan package, users can use the lines beblow to install StanDCM package.

# the development version from GitHub
# install.packages("devtools")
devtools::install_github("JihongZ/StanDCM")

The parametric version of DCM R package named GDINA can be found in R CRAN at here

Usage

You can fit a LCDM model:

mod.LCDM <- StanLCDM.run(Qmatrix = Qmatrix,
                         response.matrix = respMatrix,
                         iter = 5000, warmup = 1000, chain.num = 5)
summary(mod.LCDM)

or you can fit a DINA model by simply using:

mod.DINA <- StanDINA.run(Qmatrix = Qmatrix,
                         response.matrix = respMatrix,
                         iter = 5000, warmup = 1000, chain.num = 5)

Posterior predictive model checking (PPMC) could be also conducted:

StanDCM.ppmc(mod.LCDM, respMatrix, n.sim = 500, n.burnin = 100)

About

A R package for fitting Diagnostic Classification Modeling via Stan

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published