Giter Club home page Giter Club logo

tmsalab / rrum Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 148 KB

The goal of rrum is to provide an implementation of Gibbs sampling algorithm for Bayesian Estimation of reduced Reparametrized Unifed Model (rRUM), described by Culpepper and Hudson (2017) <doi: 10.1177/0146621617707511>.

Home Page: https://tmsalab.github.io/rrum

R 39.36% C++ 59.74% C 0.90%
rrum cdm cognitive-diagnostic-models rcpparmadillo armadillo psychometrics gibbs-sampling-algorithm r rstats

rrum's Introduction

rrum

R-CMD-check Package-License CRAN Version Badge CRAN Status RStudio CRAN Mirror’s Monthly Downloads RStudio CRAN Mirror’s Total Downloads

The goal of rrum is to provide an implementation of Gibbs sampling algorithm for Bayesian Estimation of Reduced Reparameterized Unified Model (rrum), described by Culpepper and Hudson (2017) <doi: 10.1177/0146621617707511>.

Installation

You can install rrum from CRAN using:

install.packages("rrum")

Or, you can be on the cutting-edge development version on GitHub using:

# install.packages('remotes')
remotes::install_github("tmsalab/rrum")

Usage

To use rrum, load the package using:

library("rrum")

From here, the rRUM model can be estimated using:

rrum_model = rrum(<data>, <q>)

Additional parameters can be accessed with:

rrum_model = rrum(<data>, <q>, chain_length = 10000L,
                  as = 1, bs = 1, ag = 1, bg = 1,
                  delta0 = rep(1, 2^ncol(Q)))

rRUM item data can be simulated using:

# Set a seed for reproducibility
set.seed(888)

# Setup Parameters
N = 15   # Number of Examinees / Subjects
J = 10   # Number of Items
K = 2    # Number of Skills / Attributes

# Simulate identifiable Q matrix
Q = sim_q_matrix(J, K)

# Penalties for failing to have each of the required attributes
rstar  = .5 * Q

# The probabilities of answering each item correctly for individuals 
# who do not lack any required attribute
pistar = rep(.9, J)

# Latent Class Probabilities
pis = c(.1, .2, .3, .4)

# Generate latent attribute profile with custom probability (N subjects by K skills)
subject_alphas = sim_subject_attributes(N, K, prob = pis)

# Simulate rrum items
rrum_items = simcdm::sim_rrum_items(Q, rstar, pistar, subject_alphas)

Authors

Steven Andrew Culpepper, Aaron Hudson, and James Joseph Balamuta

Citing the rrum package

To ensure future development of the package, please cite rrum package if used during an analysis or simulation study. Citation information for the package may be acquired by using in R:

citation("rrum")

License

GPL (>= 2)

rrum's People

Contributors

coatless avatar steveculpepper avatar

Watchers

 avatar  avatar  avatar

rrum's Issues

Add vignette

  • Use pre-exisiting example code to show parameter recovery.
  • Add paper example on live data?

CRAN WARN on DEVEL

From Kurt:

Dear maintainer,

Please see the problems shown on
https://cran.r-project.org/web/checks/check_results_rrum.html.

Please correct before 2023-12-12 to safely retain your package on CRAN.

CRAN check:

Version: 0.2.0
Check: whether package can be installed
Result: WARN 
  Found the following significant warnings:
    RcppExports.cpp:48:18: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  See ‘/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/rrum.Rcheck/00install.out’ for details.
  * used C++ compiler: ‘Debian clang version 17.0.5 (1)’
Flavor: [r-devel-linux-x86_64-debian-clang](https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-clang/rrum-00check.html)

Version: 0.2.0
Check: C++ specification
Result: NOTE 
    Specified C++11: please drop specification unless essential
Flavors: [r-devel-linux-x86_64-debian-clang](https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-clang/rrum-00check.html), [r-devel-linux-x86_64-debian-gcc](https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-gcc/rrum-00check.html), [r-devel-linux-x86_64-fedora-clang](https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-clang/rrum-00check.html), [r-devel-linux-x86_64-fedora-gcc](https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-gcc/rrum-00check.html), [r-devel-windows-x86_64](https://www.r-project.org/nosvn/R.check/r-devel-windows-x86_64/rrum-00check.html), [r-patched-linux-x86_64](https://www.r-project.org/nosvn/R.check/r-patched-linux-x86_64/rrum-00check.html), [r-release-linux-x86_64](https://www.r-project.org/nosvn/R.check/r-release-linux-x86_64/rrum-00check.html), [r-release-macos-arm64](https://www.r-project.org/nosvn/R.check/r-release-macos-arm64/rrum-00check.html), [r-release-macos-x86_64](https://www.r-project.org/nosvn/R.check/r-release-macos-x86_64/rrum-00check.html), [r-release-windows-x86_64](https://www.r-project.org/nosvn/R.check/r-release-windows-x86_64/rrum-00check.html)

Version: 0.2.0
Check: Rd \usage sections
Result: NOTE 
  Documented arguments not in \usage in Rd file 'rrum_helper.Rd':
    ‘deltas’
  
  Functions with \usage entries need to have the appropriate \alias
  entries, and all their arguments documented.
  The \usage entries must correspond to syntactically valid R code.
  See chapter ‘Writing R documentation files’ in the ‘Writing R
  Extensions’ manual.
Flavors: [r-devel-linux-x86_64-debian-clang](https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-clang/rrum-00check.html), [r-devel-linux-x86_64-debian-gcc](https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-gcc/rrum-00check.html), [r-devel-linux-x86_64-fedora-clang](https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-clang/rrum-00check.html), [r-devel-linux-x86_64-fedora-gcc](https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-gcc/rrum-00check.html), [r-devel-windows-x86_64](https://www.r-project.org/nosvn/R.check/r-devel-windows-x86_64/rrum-00check.html)

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.