Title: | Automating the Creation of Stan Code for TDCMs |
---|---|
Description: | A collection of functions for automatically creating 'Stan' code for transition diagnostic classification models (TDCMs) as they are defined by Madison and Bradshaw (2018) <DOI:10.1007/s11336-018-9638-5>. This package supports automating the creation of 'Stan' code for TDCMs, fungible TDCMs (i.e., TDCMs with item parameters constrained to be equal across all items), and multi-threaded TDCMs. |
Authors: | Jeffrey Hoover [aut, cre] , W. Jake Thompson [aut] , University of Kansas [cph] |
Maintainer: | Jeffrey Hoover <[email protected]> |
License: | GPL (>= 3) |
Version: | 3.0.0.9000 |
Built: | 2024-10-27 04:34:29 UTC |
Source: | https://github.com/atlas-aai/tdcmstan |
Automating the creation of Class by Attribute Matrix
bin_profile(natt)
bin_profile(natt)
natt |
An integer containing the number of assessed attributes. |
'profiles' A tibble containing a class by attribute matrix listing which attributes are mastered by each latent class.
bin_profile(natt = 3)
bin_profile(natt = 3)
Automating the creation of fungible Stan code for a TDCM when there are no common items.
create_fng_no_common_item_tdcm(q_matrix)
create_fng_no_common_item_tdcm(q_matrix)
q_matrix |
A tibble containing the assessment Q-matrix. |
'stan_code' A list containing the text for the Stan code blocks.
qmatrix = tibble::tibble(att_1 = c(1, 0, 1, 0, 1, 0), att_2 = c(0, 1, 0, 1, 0, 1)) create_fng_no_common_item_tdcm(q_matrix = qmatrix)
qmatrix = tibble::tibble(att_1 = c(1, 0, 1, 0, 1, 0), att_2 = c(0, 1, 0, 1, 0, 1)) create_fng_no_common_item_tdcm(q_matrix = qmatrix)
Automating the creation of fungible Stan code for a TDCM.
create_fng_stan_tdcm(q_matrix)
create_fng_stan_tdcm(q_matrix)
q_matrix |
A tibble containing the assessment Q-matrix. |
'stan_code' A list containing the text for the Stan code blocks.
qmatrix = tibble::tibble(att_1 = c(1, 0, 1, 0, 1, 0), att_2 = c(0, 1, 0, 1, 0, 1)) create_fng_stan_tdcm(q_matrix = qmatrix)
qmatrix = tibble::tibble(att_1 = c(1, 0, 1, 0, 1, 0), att_2 = c(0, 1, 0, 1, 0, 1)) create_fng_stan_tdcm(q_matrix = qmatrix)
Automating the creation of Stan code for a TDCM.
create_stan_tdcm(q_matrix)
create_stan_tdcm(q_matrix)
q_matrix |
A tibble containing the assessment Q-matrix. |
'stan_code' A list containing the text for the Stan code blocks.
qmatrix = tibble::tibble(att_1 = c(1, 0, 1, 0, 1, 1), att_2 = c(0, 1, 0, 1, 1, 1)) create_stan_tdcm(q_matrix = qmatrix)
qmatrix = tibble::tibble(att_1 = c(1, 0, 1, 0, 1, 1), att_2 = c(0, 1, 0, 1, 1, 1)) create_stan_tdcm(q_matrix = qmatrix)
Automating the creation of multi-threaded Stan code for a TDCM.
create_threaded_stan_tdcm(q_matrix)
create_threaded_stan_tdcm(q_matrix)
q_matrix |
A tibble containing the assessment Q-matrix. |
'stan_code' A list containing the text for the Stan code blocks.
qmatrix = tibble::tibble(att_1 = c(1, 0, 1, 0, 1, 1), att_2 = c(0, 1, 0, 1, 1, 1)) create_threaded_stan_tdcm(q_matrix = qmatrix)
qmatrix = tibble::tibble(att_1 = c(1, 0, 1, 0, 1, 1), att_2 = c(0, 1, 0, 1, 1, 1)) create_threaded_stan_tdcm(q_matrix = qmatrix)
Calculating the number of shards and simultaneous chains.
shard_calculator(num_respondents, num_responses, num_chains)
shard_calculator(num_respondents, num_responses, num_chains)
num_respondents |
An integer specifying the number of respondents. |
num_responses |
An integer specifying the number of responses (i.e., the total number of items completed across all of the respondents). |
num_chains |
An integer specifying the number of chains that need to be run. |
'ret' A list containing the number of shards to use within each chain and the number of chains to run in parallel.
shard_calculator(num_respondents = 1000, num_responses = 5000, num_chains = 4)
shard_calculator(num_respondents = 1000, num_responses = 5000, num_chains = 4)