From 50e6ebf740f5b65f4855a5d4fb8b35b343f05499 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Sun, 22 Mar 2020 15:03:15 -0500 Subject: [PATCH] Roll CRAN release 1.3.1 (#6) * Re-generate documentation... * Change order... * Avoid building vignettes... * Bump news [skip-ci] * Missed the build args... * Fix spelling errors --- DESCRIPTION | 11 ++++--- NEWS.md | 4 +-- R/RcppExports.R | 4 +-- README.Rmd | 2 +- README.md | 2 +- cIRT.Rproj | 4 ++- man/Generate_Choice.Rd | 16 ++++++++-- man/TwoPLChoicemcmc.Rd | 21 +++++++++++-- man/cIRT-package.Rd | 6 ++-- man/cIRT.Rd | 12 +++++-- man/choice_matrix.Rd | 6 ++-- man/direct_sum.Rd | 2 +- man/payout_matrix.Rd | 6 ++-- man/probitHLM.Rd | 31 ++++++++++++++----- man/survey_data.Rd | 6 ++-- man/trial_matrix.Rd | 6 ++-- src/project_source.cpp | 4 +-- .../Estimating-the-Model-in-the-Paper.Rmd | 2 +- vignettes/Package-Overview.Rmd | 4 +-- vignettes/Simulation-Study-with-cIRT.Rmd | 2 +- 20 files changed, 107 insertions(+), 44 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index d472edc..fc5b14c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: cIRT Type: Package Title: Choice Item Response Theory -Version: 1.3.0.900 +Version: 1.3.1 Authors@R: c( person("Steven Andrew", "Culpepper", email = "sculpepp@illinois.edu", @@ -15,7 +15,7 @@ Authors@R: c( ) ) Description: Jointly model the accuracy of cognitive responses and item choices - within a bayesian hierarchical framework as described by Culpepper and + within a Bayesian hierarchical framework as described by Culpepper and Balamuta (2015) . In addition, the package contains the datasets used within the analysis of the paper. License: GPL (>= 2) @@ -29,8 +29,9 @@ Suggests: knitr, rmarkdown, covr -VignetteBuilder: knitr +LazyData: true Encoding: UTF-8 -RoxygenNote: 6.1.1 +Language: en-US +VignetteBuilder: knitr +RoxygenNote: 7.1.0 Roxygen: list(markdown = TRUE) -LazyData: true diff --git a/NEWS.md b/NEWS.md index 2fe25dc..8ae5df4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# cIRT 1.3.0.900 +# cIRT 1.3.1 ## Changes @@ -54,7 +54,7 @@ # cIRT 1.0.0 ## Modeling Framework -- Implementation of the hiercharical framework described in "A Hierarchical Model for Accuracy and Choice on Standardized Tests" +- Implementation of the hierarchical framework described in "A Hierarchical Model for Accuracy and Choice on Standardized Tests" - Specifically, a choice inclusive Probit HLM and a Two Parameter Ogive Model. ## C++ Functions diff --git a/R/RcppExports.R b/R/RcppExports.R index 9239a24..3e396ff 100644 --- a/R/RcppExports.R +++ b/R/RcppExports.R @@ -130,9 +130,9 @@ TwoPLChoicemcmc <- function(unique_subject_ids, subject_ids, choices_nk, fixed_e .Call(`_cIRT_TwoPLChoicemcmc`, unique_subject_ids, subject_ids, choices_nk, fixed_effects, B, rv_effects_design, gamma, beta, zeta_rv, Sigma_zeta_inv, Y, theta0, a0, b0, mu_xi0, Sig_xi0) } -#' Probit Hierarchial Level Model +#' Probit Hierarchical Level Model #' -#' Performs modeling procedure for a Probit Hierarchial Level Model. +#' Performs modeling procedure for a Probit Hierarchical Level Model. #' #' @param unique_subject_ids A `vector` with length N x 1 containing #' unique subject IDs. diff --git a/README.Rmd b/README.Rmd index 861eea7..b5e8392 100644 --- a/README.Rmd +++ b/README.Rmd @@ -24,7 +24,7 @@ knitr::opts_chunk$set( Jointly model the accuracy of cognitive responses and item choices -within a bayesian hierarchical framework as described by Culpepper and +within a Bayesian hierarchical framework as described by Culpepper and Balamuta (2015) . ## Installation diff --git a/README.md b/README.md index f1645fd..1ad50ca 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Downloads](http://cranlogs.r-pkg.org/badges/grand-total/cIRT?color=brightgreen)] Jointly model the accuracy of cognitive responses and item choices -within a bayesian hierarchical framework as described by Culpepper and +within a Bayesian hierarchical framework as described by Culpepper and Balamuta (2015) . ## Installation diff --git a/cIRT.Rproj b/cIRT.Rproj index 9f96499..e0cf77d 100644 --- a/cIRT.Rproj +++ b/cIRT.Rproj @@ -14,5 +14,7 @@ LaTeX: pdfLaTeX BuildType: Package PackageUseDevtools: Yes -PackageInstallArgs: --no-multiarch --with-keep.source +PackageInstallArgs: --no-multiarch --with-keep.source --no-build-vignettes +PackageBuildArgs: --no-build-vignettes +PackageCheckArgs: --no-build-vignettes PackageRoxygenize: rd,collate,namespace diff --git a/man/Generate_Choice.Rd b/man/Generate_Choice.Rd index bc01832..4f6215c 100644 --- a/man/Generate_Choice.Rd +++ b/man/Generate_Choice.Rd @@ -4,8 +4,20 @@ \alias{Generate_Choice} \title{Generate Observed Data from choice model} \usage{ -Generate_Choice(N, J, K, theta, as, bs, zeta, gamma, X, W, subject_ids, - unique_subject_ids) +Generate_Choice( + N, + J, + K, + theta, + as, + bs, + zeta, + gamma, + X, + W, + subject_ids, + unique_subject_ids +) } \arguments{ \item{N}{An \code{integer} for the number of observations.} diff --git a/man/TwoPLChoicemcmc.Rd b/man/TwoPLChoicemcmc.Rd index fb03de4..c643e52 100644 --- a/man/TwoPLChoicemcmc.Rd +++ b/man/TwoPLChoicemcmc.Rd @@ -4,9 +4,24 @@ \alias{TwoPLChoicemcmc} \title{Two Parameter Choice IRT Model MCMC} \usage{ -TwoPLChoicemcmc(unique_subject_ids, subject_ids, choices_nk, fixed_effects, - B, rv_effects_design, gamma, beta, zeta_rv, Sigma_zeta_inv, Y, theta0, - a0, b0, mu_xi0, Sig_xi0) +TwoPLChoicemcmc( + unique_subject_ids, + subject_ids, + choices_nk, + fixed_effects, + B, + rv_effects_design, + gamma, + beta, + zeta_rv, + Sigma_zeta_inv, + Y, + theta0, + a0, + b0, + mu_xi0, + Sig_xi0 +) } \arguments{ \item{unique_subject_ids}{A \code{vector} with length \eqn{N \times 1}{N x 1} diff --git a/man/cIRT-package.Rd b/man/cIRT-package.Rd index 5335822..c8de2aa 100644 --- a/man/cIRT-package.Rd +++ b/man/cIRT-package.Rd @@ -7,7 +7,7 @@ \title{cIRT: Choice Item Response Theory} \description{ Jointly model the accuracy of cognitive responses and item choices - within a bayesian hierarchical framework as described by Culpepper and + within a Bayesian hierarchical framework as described by Culpepper and Balamuta (2015) . In addition, the package contains the datasets used within the analysis of the paper. } @@ -21,11 +21,11 @@ Useful links: } \author{ -\strong{Maintainer}: James Joseph Balamuta \email{balamut2@illinois.edu} (0000-0003-2826-8458) [copyright holder] +\strong{Maintainer}: James Joseph Balamuta \email{balamut2@illinois.edu} (\href{https://orcid.org/0000-0003-2826-8458}{ORCID}) [copyright holder] Authors: \itemize{ - \item Steven Andrew Culpepper \email{sculpepp@illinois.edu} (0000-0003-4226-6176) [copyright holder] + \item Steven Andrew Culpepper \email{sculpepp@illinois.edu} (\href{https://orcid.org/0000-0003-4226-6176}{ORCID}) [copyright holder] } } diff --git a/man/cIRT.Rd b/man/cIRT.Rd index f95d535..0ff7f00 100644 --- a/man/cIRT.Rd +++ b/man/cIRT.Rd @@ -4,8 +4,16 @@ \alias{cIRT} \title{Generic Implementation of Choice IRT MCMC} \usage{ -cIRT(subject_ids, fixed_effects, B_elem_plus1, rv_effects, trial_matrix, - choices_nk, burnit, chain_length = 10000L) +cIRT( + subject_ids, + fixed_effects, + B_elem_plus1, + rv_effects, + trial_matrix, + choices_nk, + burnit, + chain_length = 10000L +) } \arguments{ \item{subject_ids}{A \code{vector} that contains subject IDs for each line of diff --git a/man/choice_matrix.Rd b/man/choice_matrix.Rd index e0924b9..dbe9cc7 100644 --- a/man/choice_matrix.Rd +++ b/man/choice_matrix.Rd @@ -4,7 +4,8 @@ \name{choice_matrix} \alias{choice_matrix} \title{Choice Matrix Data} -\format{A data frame with 3780 observations on the following 5 variables. +\format{ +A data frame with 3780 observations on the following 5 variables. \describe{ \item{\code{subject_id}}{Research Participant Subject ID. There are 102 IDs and each ID has 15 observations.} \item{\code{hard_q_id}}{The item ID of the hard question assigned to the student (16-30)} @@ -13,7 +14,8 @@ \item{\code{high_value}}{Range of values associated with Difficult Question that span from 12 to 16, repeated three times per subject} \item{\code{low_value}}{Range of values associated with Easy Question that span from 4 to 6, repeated five times per subject} \item{\code{is_correct_choice}}{Did the user select an item that was answered correctly?} -}} +} +} \source{ Choice38 Experiment at UIUC during Spring 2014 - Fall 2014 } diff --git a/man/direct_sum.Rd b/man/direct_sum.Rd index e6c5270..1c01fba 100644 --- a/man/direct_sum.Rd +++ b/man/direct_sum.Rd @@ -7,7 +7,7 @@ direct_sum(x) } \arguments{ -\item{x}{A \code{field} or \code{list} containing matrices} +\item{x}{A \verb{field} or \code{list} containing matrices} } \value{ Matrix containing the direct sum of all matrices in the list. diff --git a/man/payout_matrix.Rd b/man/payout_matrix.Rd index 5e2cc73..ad104cb 100644 --- a/man/payout_matrix.Rd +++ b/man/payout_matrix.Rd @@ -4,13 +4,15 @@ \name{payout_matrix} \alias{payout_matrix} \title{Payout Matrix Data} -\format{A data frame with 252 observations on the following 4 variables. +\format{ +A data frame with 252 observations on the following 4 variables. \describe{ \item{\code{Participant}}{Subject ID} \item{\code{cum_sum}}{Sum of all payouts} \item{\code{num_correct_choices}}{Total number of correct choices (out of 15)} \item{\code{num_correct_trials}}{Total number of correct trials (out of 30)} -}} +} +} \source{ Choice38 Experiment at UIUC during Spring 2014 - Fall 2014 } diff --git a/man/probitHLM.Rd b/man/probitHLM.Rd index 02742e0..5bb6385 100644 --- a/man/probitHLM.Rd +++ b/man/probitHLM.Rd @@ -2,12 +2,29 @@ % Please edit documentation in R/RcppExports.R \name{probitHLM} \alias{probitHLM} -\title{Probit Hierarchial Level Model} +\title{Probit Hierarchical Level Model} \usage{ -probitHLM(unique_subject_ids, subject_ids, choices_nk, - fixed_effects_design, rv_effects_design, B_elem_plus1, gamma, beta, - theta, zeta_rv, WtW, Z_c, Wzeta_0, inv_Sigma_gamma, mu_gamma, - Sigma_zeta_inv, S0, mu_beta, sigma_beta_inv) +probitHLM( + unique_subject_ids, + subject_ids, + choices_nk, + fixed_effects_design, + rv_effects_design, + B_elem_plus1, + gamma, + beta, + theta, + zeta_rv, + WtW, + Z_c, + Wzeta_0, + inv_Sigma_gamma, + mu_gamma, + Sigma_zeta_inv, + S0, + mu_beta, + sigma_beta_inv +) } \arguments{ \item{unique_subject_ids}{A \code{vector} with length N x 1 containing @@ -40,7 +57,7 @@ subject understanding estimates.} \item{zeta_rv}{A \code{matrix} with dimensions N x V containing random parameter estimates.} -\item{WtW}{A \code{field} P x P x N contains the +\item{WtW}{A \verb{field} P x P x N contains the caching for direct sum.} \item{Z_c}{A \code{vector} with dimensions N*K x 1} @@ -76,7 +93,7 @@ A \code{list} that contains: } } \description{ -Performs modeling procedure for a Probit Hierarchial Level Model. +Performs modeling procedure for a Probit Hierarchical Level Model. } \details{ The function is implemented to decrease the amount of vectorizations diff --git a/man/survey_data.Rd b/man/survey_data.Rd index 470b284..b0287b2 100644 --- a/man/survey_data.Rd +++ b/man/survey_data.Rd @@ -4,7 +4,8 @@ \name{survey_data} \alias{survey_data} \title{Survey Data} -\format{A data frame with 102 observations on the following 2 variables. +\format{ +A data frame with 102 observations on the following 2 variables. \describe{ \item{\code{id}}{Subject's Assigned Research ID} \item{\code{sex}}{Subject's sex: @@ -13,7 +14,8 @@ \item Female } } -}} +} +} \source{ Choice38 Experiment at UIUC during Spring 2014 - Fall 2014 } diff --git a/man/trial_matrix.Rd b/man/trial_matrix.Rd index 152a2cf..4515fbb 100644 --- a/man/trial_matrix.Rd +++ b/man/trial_matrix.Rd @@ -4,7 +4,8 @@ \name{trial_matrix} \alias{trial_matrix} \title{Trial Matrix Data} -\format{A data frame with 252 observations on the following 30 variables. +\format{ +A data frame with 252 observations on the following 30 variables. \describe{ \item{\code{t1}}{Subject's Response to Item 1.} \item{\code{t2}}{Subject's Response to Item 2.} @@ -36,7 +37,8 @@ \item{\code{t28}}{Subject's Response to Item 28.} \item{\code{t29}}{Subject's Response to Item 29.} \item{\code{t30}}{Subject's Response to Item 30.} -}} +} +} \source{ Choice38 Experiment at UIUC during Spring 2014 - Fall 2014 } diff --git a/src/project_source.cpp b/src/project_source.cpp index 4c21dad..3182e73 100644 --- a/src/project_source.cpp +++ b/src/project_source.cpp @@ -305,9 +305,9 @@ Rcpp::List TwoPLChoicemcmc(/* New Parameters */ Rcpp::Named("Wzeta_0", Wzeta_0)); } -//' Probit Hierarchial Level Model +//' Probit Hierarchical Level Model //' -//' Performs modeling procedure for a Probit Hierarchial Level Model. +//' Performs modeling procedure for a Probit Hierarchical Level Model. //' //' @param unique_subject_ids A `vector` with length N x 1 containing //' unique subject IDs. diff --git a/vignettes/Estimating-the-Model-in-the-Paper.Rmd b/vignettes/Estimating-the-Model-in-the-Paper.Rmd index 1b23d0e..a7647a4 100644 --- a/vignettes/Estimating-the-Model-in-the-Paper.Rmd +++ b/vignettes/Estimating-the-Model-in-the-Paper.Rmd @@ -17,7 +17,7 @@ each section in the example displayed in `cIRT()` function. # Data Within this vignette, we used two different data sets to generate a Choice -Item Response Theory Model with the rountine located in `cIRT`. +Item Response Theory Model with the routine located in `cIRT`. ```{r load_pkg} library(cIRT) diff --git a/vignettes/Package-Overview.Rmd b/vignettes/Package-Overview.Rmd index b708c7b..936f88e 100644 --- a/vignettes/Package-Overview.Rmd +++ b/vignettes/Package-Overview.Rmd @@ -10,11 +10,11 @@ vignette: > # Intro -The package is a companion to the paper A hierarchical model for accuracy and choice on standardized tests in [Psychometrika](http://link.springer.com/article/10.1007/s11336-015-9484-7) written by Culpepper, S. A. & Balamuta, J. J. Within this package, we make available the code used for the analysis within the paper as well as the data. +The package is a companion to the paper "A hierarchical model for accuracy and choice on standardized tests" in [Psychometrika](http://link.springer.com/article/10.1007/s11336-015-9484-7) written by Culpepper, S. A. & Balamuta, J. J. Within this package, we make available the code used for the analysis within the paper as well as the data. # Functions -The package provides C++ implementations of the hierarchial bayesian modeling framework for choice. The primary functions that are novel contributions to psychometric literature are the `probitHLM()` and `TwoPLChoicemcmc()` that respectively provide a choice inclusive Probit HLM and a Two Parameter Ogive Model and are called by an overall wrapper function `cIRT()`. These functions do have an overall dependency on other components that have also been coded within C++ and may benefit a practitioner seeking to do use the same functionality elsewhere. +The package provides C++ implementations of the hierarchical bayesian modeling framework for choice. The primary functions that are novel contributions to psychometric literature are the `probitHLM()` and `TwoPLChoicemcmc()` that respectively provide a choice inclusive Probit HLM and a Two Parameter Ogive Model and are called by an overall wrapper function `cIRT()`. These functions do have an overall dependency on other components that have also been coded within C++ and may benefit a practitioner seeking to do use the same functionality elsewhere. * Random Number Generation for the following distributions: Wishart `rwishart()`, Inverse Wishart `riwishart()`, and Multivariate Normal `rmvnorm()`. * Matrix Centering `center_matrix()` diff --git a/vignettes/Simulation-Study-with-cIRT.Rmd b/vignettes/Simulation-Study-with-cIRT.Rmd index 9d690b2..59c1c9c 100644 --- a/vignettes/Simulation-Study-with-cIRT.Rmd +++ b/vignettes/Simulation-Study-with-cIRT.Rmd @@ -14,7 +14,7 @@ The document addresses the simulation study that was performed to understand whe # Simulation -The simulation study below is configured to generate results one might obtain from a pool of 1,000 subjects taking a 20 item test. We obtain summarize the results obtained from running the model 100 times over slightly differring $\theta$ and $\eta$. +The simulation study below is configured to generate results one might obtain from a pool of 1,000 subjects taking a 20 item test. We obtain summarize the results obtained from running the model 100 times over slightly differing $\theta$ and $\eta$. ```{r sim_setup, eval = F} ### Variables