Skip to content

Commit 6af3b4c

Browse files
committed
Removed some data sets.
1 parent 124715b commit 6af3b4c

33 files changed

+188
-154
lines changed

R/RcppExports.R

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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
111117
OddsRatio <- 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

R/Spatial_rotation_data.R

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,3 @@
1-
#' Sample Size
2-
#'
3-
#' This data set contains the sample size of the Spatial Rotation Learning Program.
4-
#' @format An integer of the sample size.
5-
#' @source Spatial Rotation Learning Experiment at UIUC between Fall 2015 and Spring 2016.
6-
#' @author Shiyu Wang, Yan Yang, Jeff Douglas, and Steve Culpepper
7-
"N"
8-
9-
10-
#' Item Pool Size
11-
#'
12-
#' This data set contains the size of the item pool for the Spatial Rotation Learning Program.
13-
#' @format An integer of the total number of items.
14-
#' @source Spatial Rotation Learning Experiment at UIUC between Fall 2015 and Spring 2016.
15-
#' @author Shiyu Wang, Yan Yang, Jeff Douglas, and Steve Culpepper
16-
"J"
17-
18-
19-
#' Items administered per time point
20-
#'
21-
#' This data set contains the number of items administered at each time point to each subject.
22-
#' @format An integer of the number of items per time point.
23-
#' @source Spatial Rotation Learning Experiment at UIUC between Fall 2015 and Spring 2016.
24-
#' @author Shiyu Wang, Yan Yang, Jeff Douglas, and Steve Culpepper
25-
"Jt"
26-
27-
#' Number of skills
28-
#'
29-
#' This data set contains the number of skills learned/assessed in the Spatial Rotation Learning Program.
30-
#' @format An integer of the total number of skills.
31-
#' @source Spatial Rotation Learning Experiment at UIUC between Fall 2015 and Spring 2016.
32-
#' @author Shiyu Wang, Yan Yang, Jeff Douglas, and Steve Culpepper
33-
"K"
34-
351
#' Observed response times list
362
#'
373
#' This data set contains the observed latencies of responses of all subjects to all questions in the Spatial Rotation
@@ -74,15 +40,6 @@
7440

7541

7642

77-
#' Number of time points (initial included)
78-
#'
79-
#' This data set contains the number of time points (including the initial time) of the Spatial Rotation Learning Program.
80-
#' @format An integer of the number of time points.
81-
#' @source Spatial Rotation Learning Experiment at UIUC between Fall 2015 and Spring 2016.
82-
#' @author Shiyu Wang, Yan Yang, Jeff Douglas, and Steve Culpepper
83-
"T"
84-
85-
8643
#' Subjects' test version
8744
#'
8845
#' This data set contains each subject's test version in the Spatial Rotation Learning Program.

R/example_R_code.R

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
#' @examples
22
#' \dontrun{
33
#'
4-
#' #######################################################
5-
#' # Testing CDM Learning functions #
6-
#' #######################################################
4+
#' ############################################################
5+
#' # Example R code for simulating and fitting each model #
6+
#' ############################################################
77
#' # Load the spatial rotation data
8-
#' data("Spatial_Rotation")
8+
#' N = length(Test_versions)
9+
#' Jt = nrow(Q_list[[1]])
10+
#' K = ncol(Q_list[[1]])
11+
#' T = nrow(test_order)
12+
#' J = Jt*T
913
#'
1014
#' # Create the ideal response cube, where each slice is the ideal response matrix for an item block
1115
#' ETAs <- array(NA,dim = c(Jt,2^K,T))

data/J.RData

-61 Bytes
Binary file not shown.

data/Jt.RData

-62 Bytes
Binary file not shown.

data/K.RData

-61 Bytes
Binary file not shown.

data/N.RData

-62 Bytes
Binary file not shown.

data/T.RData

-61 Bytes
Binary file not shown.

man/J.Rd

Lines changed: 0 additions & 20 deletions
This file was deleted.

man/Jt.Rd

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)