@@ -106,7 +106,13 @@ resp_miss <- function(Responses, test_order, Test_versions) {
106106# ' @param Yt An N-by-J response \code{matrix}
107107# ' @return A J-by-J upper-triangular \code{matrix} of the item pairwise odds ratios
108108# ' @examples
109- # ' \donttest{OddsRatio(N,Jt,Y_real_list[[1]])}
109+ # ' \donttest{
110+ # ' N = length(Test_versions)
111+ # ' Jt = nrow(Q_list[[1]])
112+ # ' K = ncol(Q_list[[1]])
113+ # ' T = nrow(test_order)
114+ # ' J = Jt*T
115+ # ' OddsRatio(N,Jt,Y_real_list[[1]])}
110116# ' @export
111117OddsRatio <- function (N , J , Yt ) {
112118 .Call(`_hmcdm_OddsRatio` , N , J , Yt )
@@ -138,6 +144,11 @@ getMode <- function(sorted_vec, size) {
138144# ' @author Susu Zhang
139145# ' @examples
140146# ' \donttest{
147+ # ' N = length(Test_versions)
148+ # ' Jt = nrow(Q_list[[1]])
149+ # ' K = ncol(Q_list[[1]])
150+ # ' T = nrow(test_order)
151+ # ' J = Jt*T
141152# ' output_FOHM = MCMC_learning(Y_real_list,Q_list,"DINA_FOHM",test_order,Test_versions,10000,5000)
142153# ' point_estimates = point_estimates_learning(output_FOHM,"DINA_FOHM",N,Jt,K,T,alpha_EAP = T)
143154# ' }
@@ -299,6 +310,11 @@ sim_resp_DINA <- function(J, K, ETA, Svec, Gvec, alpha) {
299310# ' @param Test_versions A length N \code{vector} of the test version of each examinee
300311# ' @return An \code{array} of DINA item responses of examinees across all time points
301312# ' @examples
313+ # ' N = length(Test_versions)
314+ # ' Jt = nrow(Q_list[[1]])
315+ # ' K = ncol(Q_list[[1]])
316+ # ' T = nrow(test_order)
317+ # ' J = Jt*T
302318# ' itempars_true <- array(runif(Jt*2*T,.1,.2), dim = c(Jt,2,T))
303319# '
304320# ' ETAs <- array(NA,dim = c(Jt,2^K,T))
@@ -342,6 +358,7 @@ pYit_DINA <- function(ETA_it, Y_it, itempars) {
342358# ' @examples
343359# ' J = 15
344360# ' K = 4
361+ # ' T = 5
345362# ' Q = random_Q(J,K)
346363# ' Smats <- matrix(runif(J*K,.1,.3),J,K)
347364# ' Gmats <- matrix(runif(J*K,.1,.3),J,K)
@@ -368,6 +385,11 @@ sim_resp_rRUM <- function(J, K, Q, rstar, pistar, alpha) {
368385# ' @param Test_versions A length N \code{vector} of the test version of each examinee
369386# ' @return An \code{array} of rRUM item responses of examinees across all time points
370387# ' @examples
388+ # ' N = length(Test_versions)
389+ # ' Jt = nrow(Q_list[[1]])
390+ # ' K = ncol(Q_list[[1]])
391+ # ' T = nrow(test_order)
392+ # ' J = Jt*T
371393# ' Smats <- array(runif(Jt*K*(T),.1,.3),c(Jt,K,(T)))
372394# ' Gmats <- array(runif(Jt*K*(T),.1,.3),c(Jt,K,(T)))
373395# ' r_stars <- array(NA,c(Jt,K,T))
@@ -439,6 +461,11 @@ sim_resp_NIDA <- function(J, K, Q, Svec, Gvec, alpha) {
439461# ' @param Test_versions A length N \code{vector} of the test version of each examinee
440462# ' @return An \code{array} of NIDA item responses of examinees across all time points
441463# ' @examples
464+ # ' N = length(Test_versions)
465+ # ' Jt = nrow(Q_list[[1]])
466+ # ' K = ncol(Q_list[[1]])
467+ # ' T = nrow(test_order)
468+ # ' J = Jt*T
442469# ' Svec <- runif(K,.1,.3)
443470# ' Gvec <- runif(K,.1,.3)
444471# ' Test_versions_sim <- sample(1:5,N,replace = T)
@@ -495,6 +522,11 @@ G2vec_efficient <- function(ETA, J_incidence, alphas_i, test_version_i, test_ord
495522# ' @param Test_versions A length N \code{vector} of the test version of each examinee
496523# ' @return A \code{cube} of response times of subjects on each item across time
497524# ' @examples
525+ # ' N = length(Test_versions)
526+ # ' Jt = nrow(Q_list[[1]])
527+ # ' K = ncol(Q_list[[1]])
528+ # ' T = nrow(test_order)
529+ # ' J = Jt*T
498530# ' class_0 <- sample(1:2^K, N, replace = T)
499531# ' Alphas_0 <- matrix(0,N,K)
500532# ' mu_thetatau = c(0,0)
@@ -542,6 +574,11 @@ dLit <- function(G_it, L_it, RT_itempars_it, tau_i, phi) {
542574# ' @param Jt An \code{int} of number of items in each block
543575# ' @return An N-by-K-by-T \code{array} of attribute patterns of subjects at each time point.
544576# ' @examples
577+ # ' N = length(Test_versions)
578+ # ' Jt = nrow(Q_list[[1]])
579+ # ' K = ncol(Q_list[[1]])
580+ # ' T = nrow(test_order)
581+ # ' J = Jt*T
545582# ' class_0 <- sample(1:2^K, N, replace = T)
546583# ' Alphas_0 <- matrix(0,N,K)
547584# ' thetas_true = rnorm(N)
@@ -572,6 +609,11 @@ pTran_HO_sep <- function(alpha_prev, alpha_post, lambdas, theta_i, Q_i, Jt, t) {
572609# ' @param Jt An \code{int} of number of items in each block
573610# ' @return An N-by-K-by-T \code{array} of attribute patterns of subjects at each time point.
574611# ' @examples
612+ # ' N = length(Test_versions)
613+ # ' Jt = nrow(Q_list[[1]])
614+ # ' K = ncol(Q_list[[1]])
615+ # ' T = nrow(test_order)
616+ # ' J = Jt*T
575617# ' class_0 <- sample(1:2^K, N, replace = T)
576618# ' Alphas_0 <- matrix(0,N,K)
577619# ' mu_thetatau = c(0,0)
@@ -602,6 +644,11 @@ pTran_HO_joint <- function(alpha_prev, alpha_post, lambdas, theta_i, Q_i, Jt, t)
602644# ' @param R A K-by-K dichotomous reachability \code{matrix} indicating the attribute hierarchies. The k,k'th entry of R is 1 if k' is prereq to k.
603645# ' @return An N-by-K-by-T \code{array} of attribute patterns of subjects at each time point.
604646# ' @examples
647+ # ' N = length(Test_versions)
648+ # ' Jt = nrow(Q_list[[1]])
649+ # ' K = ncol(Q_list[[1]])
650+ # ' T = nrow(test_order)
651+ # ' J = Jt*T
605652# ' tau <- numeric(K)
606653# ' for(k in 1:K){
607654# ' tau[k] <- runif(1,.2,.6)
@@ -639,6 +686,11 @@ pTran_indept <- function(alpha_prev, alpha_post, taus, R) {
639686# ' @param T An \code{int} of number of time points
640687# ' @return An N-by-K-by-T \code{array} of attribute patterns of subjects at each time point.
641688# ' @examples
689+ # ' N = length(Test_versions)
690+ # ' Jt = nrow(Q_list[[1]])
691+ # ' K = ncol(Q_list[[1]])
692+ # ' T = nrow(test_order)
693+ # ' J = Jt*T
642694# ' TP <- TPmat(K)
643695# ' Omega_true <- rOmega(TP)
644696# ' class_0 <- sample(1:2^K, N, replace = T)
@@ -661,6 +713,11 @@ rAlpha <- function(Omega, N, T, alpha1) {
661713# ' @param TP A 2^K-by-2^K dichotomous matrix of indicating possible transitions under the monotonicity assumption, created with
662714# ' the TPmat function
663715# ' @examples
716+ # ' N = length(Test_versions)
717+ # ' Jt = nrow(Q_list[[1]])
718+ # ' K = ncol(Q_list[[1]])
719+ # ' T = nrow(test_order)
720+ # ' J = Jt*T
664721# ' TP = TPmat(K)
665722# ' Omega_sim = rOmega(TP)
666723# ' @export
0 commit comments