This is an interface function to estimate the model parameters based on the task-level (i.e., passage-level in ORF assessment context) accuracy and speed data by implementing the Monte Carlo EM algorithm described in Potgieter et al. (2017) or fully Bayesian method described in Kara et al. (2020).
Usage
fit.model(
data = NA,
person.id = "",
task.id = "",
sub.task.id = "",
max.counts = "",
obs.counts = "",
time = "",
k.in = 5,
reps.in = 2,
ests.in = NA,
est = "mcem",
se = "none",
verbose = FALSE,
testlet = FALSE
)Arguments
- data
A data frame or a data generated by the
prepfunction. If this argument is used with prepared data, the next five argumentsperson.id, task.id, max.counts, obs.counts, timeshould be skipped.- person.id
Quoted variable name in
datathat indicates the unique person identifier.- task.id
Quoted variable name in
datathat indicates the unique task identifier. In the ORF assessment context, it is the passage identifier.- sub.task.id
Quoted variable name in
datathat indicates the unique sub task identifier. In the ORF assessment context, it is the sentence identifier. It is required when testlet is TRUE.- max.counts
Quoted variable name in
datathat indicates the number of attempts in the task. In the ORF assessment context, it is the number of words in the passage.- obs.counts
Quoted variable name in
datathat indicates the number of successful attempts in each task. In the ORF assessment context, it is the number of words read correctly for the passage.- time
Quoted variable name in
datathat indicates the time in seconds took to complete the task. In the ORF context, it is the time took to complete reading the passage.- k.in
Numeric, indicating the number of imputations. Default is
5.- reps.in
Numeric, indicating the number of Monte-Carlo iterations. Default is
2.- ests.in
An optional list of numeric vectors, indicating initial values of the model parameters. If this argument is not given,
momfunction will be called to generate the initial values.- est
Quoted string, indicating the choice of the estimator. It has to be one of
"mcem", "bayes". Default is"mcem".- se
Quoted string, indicating the choice of the standard errors. It has to be one of
"none", "analytic", "bootstrap". Default is"none".- verbose
Boolean. If
TRUE, the summary will be output. Default isFALSE.- testlet
Boolean. If
TRUE, the fit.model.testlet will be run. Default isFALSE.
References
Potgieter, N., Kamata, A., & Kara, Y. (2017). An EM algorithm for estimating an oral reading speed and accuracy model. Manuscript submitted for publication.
Kara, Y., Kamata, A., Potgieter, C., & Nese, J. F. (2020). Estimating model-based oral reading fluency: A bayesian approach with a binomial-lognormal joint latent model. Educational and Psychological Measurement, 1–25.
See also
scoring for scoring.
Examples
# example code
MCEM_run <- fit.model(data = passage2,
person.id = "id.student",
task.id = "id.passage",
max.counts = "numwords.pass",
obs.counts = "wrc",
time = "sec",
k.in = 5,
reps.in = 50,
est = "mcem")
#> INFO [2025-07-12 14:24:46] Begin mcem process
#> INFO [2025-07-12 14:25:16] End mcem process