Skip to content

Commit a7110f2

Browse files
committed
2 parents d6aa70b + d7e130a commit a7110f2

File tree

6 files changed

+90
-89
lines changed

6 files changed

+90
-89
lines changed

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: caMST
22
Type: Package
33
Title: Mixed Computerized Adaptive Multistage Testing
4-
Version: 0.1.5
5-
Date: 2021-08-17
4+
Version: 0.1.6
5+
Date: 2022-06-24
66
Authors@R: person("Anthony", "Raborn", email = "anthony.w.raborn@gmail.com", role = c("aut","cre"))
77
Description: Provides functions to more easily analyze computerized adaptive tests. Currently, functions for computerized
88
adaptive tests (CAT), computer adaptive multistage tests (CMT), and mixed computer adaptive multistage tests (McaMST)
@@ -21,4 +21,4 @@ Imports: catR,
2121
Suggests: testthat,
2222
knitr,
2323
rmarkdown
24-
RoxygenNote: 7.1.1
24+
RoxygenNote: 7.2.0

R/multistage_test_function.R

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#' \item{final.theta.estimate}{A numeric vector of the final theta estimates using the \code{method} provided in \code{function.call}.}
2929
#' \item{eap.theta}{A numeric vector of the final theta estimates using the expected a posteriori (EAP) theta estimate from \code{catR::eapEst}.}
3030
#' \item{final.theta.Baker}{A numeric vector of the final theta estimates using an iterative maximum likelihood estimation procedure as described in chapter 5 of Baker (2001).}
31-
#' \item{final.theta.SEM}{A numeric vector of the final standard error of measurement (SEM) estimates using the \code{mstR::semTheta} function.}
31+
#' \item{final.theta.SEM}{A numeric vector of the final standard error of measurement (SEM) estimates using the \code{catR::semTheta} function.}
3232
#' \item{final.items.seen}{A matrix of the final items seen by each individual using the supplied item names. `NA` values indicate that an individual wasn't given any items to answer after the last specified item in their row.}
3333
#' \item{final.responses}{A matrix of the responses to the items seen in \code{final.items.seen}. \code{NA} values indicate that the individual didn't answer the question in the supplied response file or wasn't given any more items to answer.}
3434
#' \item{transition.matrix}{The \code{transition_matrix} originally supplied to the function.}
@@ -138,7 +138,7 @@ multistage_test <-
138138
seen.items = c(seen.items, which(next.module==1))
139139
current.responses = mst.responses[, seen.items]
140140
num.correct = sum(current.responses)
141-
current.theta = mstR::thetaEst(it = mst_item_bank[seen.items, ],
141+
current.theta = catR::thetaEst(it = mst_item_bank[seen.items, ],
142142
x = as.numeric(current.responses),
143143
method = method)
144144
seen.modules = c(seen.modules, selected.module)
@@ -147,11 +147,11 @@ multistage_test <-
147147
final.responses[i, ] = as.numeric(mst.responses[, seen.items])
148148
final.items.seen[i, ] = seen.items
149149
final.modules.seen[i,] = seen.modules
150-
final.theta[i] = mstR::thetaEst(it = mst_item_bank[seen.items, ],
150+
final.theta[i] = catR::thetaEst(it = mst_item_bank[seen.items, ],
151151
x = final.responses[i, ],
152152
method = method)
153153

154-
final.theta.eap[i] = mstR::eapEst(it = mst_item_bank[seen.items, ], x = final.responses[i, ])
154+
final.theta.eap[i] = catR::eapEst(it = mst_item_bank[seen.items, ], x = final.responses[i, ])
155155

156156
temp.iter = iterative.theta.estimate(
157157
initial_theta = initial_theta,
@@ -161,7 +161,7 @@ multistage_test <-
161161
)))
162162
final.theta.Baker[i] = temp.iter[1]
163163
final.theta.SEM[i] =
164-
mstR::semTheta(thEst = final.theta[i], it = mst_item_bank[seen.items, ],
164+
catR::semTheta(thEst = final.theta[i], it = mst_item_bank[seen.items, ],
165165
x = final.responses[i, ], model = model,
166166
method = method)
167167

@@ -196,7 +196,7 @@ multistage_test <-
196196
seen.items = c(seen.items, which(next.module==1))
197197
current.responses = mst.responses[, seen.items]
198198
num.correct = sum(current.responses[length(current.responses):(sum(next.module)+1)])
199-
current.theta = mstR::thetaEst(it = mst_item_bank[seen.items, ],
199+
current.theta = catR::thetaEst(it = mst_item_bank[seen.items, ],
200200
x = as.numeric(current.responses),
201201
method = method)
202202
seen.modules = c(seen.modules, selected.module)
@@ -205,11 +205,11 @@ multistage_test <-
205205
final.responses[i, ] = as.numeric(mst.responses[, seen.items])
206206
final.items.seen[i, ] = seen.items
207207
final.modules.seen[i,] = seen.modules
208-
final.theta[i] = mstR::thetaEst(it = mst_item_bank[seen.items, ],
208+
final.theta[i] = catR::thetaEst(it = mst_item_bank[seen.items, ],
209209
x = final.responses[i, ],
210210
method = method)
211211

212-
final.theta.eap[i] = mstR::eapEst(it = mst_item_bank[seen.items, ], x = final.responses[i, ])
212+
final.theta.eap[i] = catR::eapEst(it = mst_item_bank[seen.items, ], x = final.responses[i, ])
213213

214214
temp.iter = iterative.theta.estimate(
215215
initial_theta = initial_theta,
@@ -219,7 +219,7 @@ multistage_test <-
219219
)))
220220
final.theta.Baker[i] = temp.iter[1]
221221
final.theta.SEM[i] =
222-
mstR::semTheta(thEst = final.theta[i], it = mst_item_bank[seen.items, ],
222+
catR::semTheta(thEst = final.theta[i], it = mst_item_bank[seen.items, ],
223223
x = final.responses[i, ], model = model,
224224
method = method)
225225
# end loop for this person; repeat loop for next
@@ -234,10 +234,10 @@ multistage_test <-
234234
model = model,
235235
theta = initial_theta
236236
)
237-
current.responses = mst.responses[, first.module$items]
237+
current.responses = mst.responses[i, first.module$items]
238238
seen.modules = first.module$module
239239
seen.items = first.module$items
240-
first.theta.est = mstR::thetaEst(it = mst_item_bank[seen.items, ],
240+
first.theta.est = catR::thetaEst(it = mst_item_bank[seen.items, ],
241241
x = current.responses,
242242
method = method)
243243

@@ -255,8 +255,8 @@ multistage_test <-
255255
criterion = module_select
256256
)
257257
seen.items = c(seen.items, next.module$items)
258-
current.responses = response_matrix[, seen.items]
259-
current.theta = mstR::thetaEst(it = mst_item_bank[seen.items, ],
258+
current.responses = response_matrix[i, seen.items]
259+
current.theta = catR::thetaEst(it = mst_item_bank[seen.items, ],
260260
x = current.responses,
261261
method = method)
262262
seen.modules = c(seen.modules, next.module$module)
@@ -266,11 +266,11 @@ multistage_test <-
266266
final.responses[i, ] = as.numeric(mst.responses[, seen.items])
267267
final.items.seen[i, ] = seen.items
268268
final.modules.seen[i, ] = seen.modules
269-
final.theta[i] = mstR::thetaEst(it = mst_item_bank[seen.items, ],
269+
final.theta[i] = catR::thetaEst(it = mst_item_bank[seen.items, ],
270270
x = final.responses[i, ],
271271
method = method)
272272

273-
final.theta.eap[i] = mstR::eapEst(it = mst_item_bank[seen.items, ], x = final.responses[i, ])
273+
final.theta.eap[i] = catR::eapEst(it = mst_item_bank[seen.items, ], x = final.responses[i, ])
274274

275275
temp.iter = iterative.theta.estimate(
276276
initial_theta = initial_theta,
@@ -280,7 +280,7 @@ multistage_test <-
280280
)))
281281
final.theta.Baker[i] = temp.iter[1]
282282
final.theta.SEM[i] =
283-
mstR::semTheta(thEst = final.theta[i], it = mst_item_bank[seen.items, ],
283+
catR::semTheta(thEst = final.theta[i], it = mst_item_bank[seen.items, ],
284284
x = final.responses[i, ], model = model,
285285
method = method)
286286
# end loop for this person; repeat loop for next

README.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ data.frame("True Theta" = example_thetas,
8686
1.96*resultsMLWMI@final.theta.SEM)
8787
```
8888

89-
The theta estimates under CMT using the default module selection are close except for person 4, whose estimate falls outside of the 95% confidence interval. Using the "MLWMI" module selection does not work very well at all for this data, though.
89+
The theta estimates under CMT using the default module selection are close as all the estimates fall within the 95% confidence interval. Using the "MLWMI" module selection produces different, but similarly accurate estimates.
9090

9191
### Mixed Computerized Adaptive Multistage Testing (Mca-MST)
9292

@@ -205,9 +205,9 @@ catResults
205205
data.frame("True Theta" = example_thetas,
206206
"Estimated Theta" = catResults@final.theta.estimate,
207207
"CI95 Lower Bound" = catResults@final.theta.estimate -
208-
1.96*results@final.theta.SEM,
208+
1.96*catResults@final.theta.SEM,
209209
"CI95 Upper Bound" = catResults@final.theta.estimate +
210-
1.96*results@final.theta.SEM)
210+
1.96*catResults@final.theta.SEM)
211211
212212
```
213213

0 commit comments

Comments
 (0)