| update | R Documentation |
The update function provides a unified and convenient interface to
re-fit ForceChoice models with modified parameter settings while
preserving all other original configurations. It allows users to change
the estimation method, adjust control parameters, increase dimensionality,
or switch model specifications without re-specifying the entire call.
## S3 method for class 'MIRT'
update(object, ...)
## S3 method for class 'MGPCM'
update(object, ...)
## S3 method for class 'MGGUM'
update(object, ...)
## S3 method for class 'FCMIRT'
update(object, ...)
## S3 method for class 'FCDCM'
update(object, ...)
## S3 method for class 'FCGDINA'
update(object, ...)
## S3 method for class 'FCGGUM'
update(object, ...)
## S3 method for class 'TIRT'
update(object, ...)
object |
An object of one of the following classes:
|
... |
Additional named arguments passed to override or extend the
original call. Valid arguments depend on the class of |
Internally, each method extracts the stored arguments list from
the input object, merges it with user-provided ... using
modifyList, explicitly merges control lists from the
previous fit and the update call, filters to only the formal parameters of
the target fit.*() function, then re-invokes the fitting function
via do.call.
This ensures that:
Only explicitly overridden parameters are changed.
Default values from the original call remain intact.
Complex nested structures (e.g., control.model,
control.method, and control lists) can be partially
updated.
Internal arguments (e.g., cores, vis, seed)
are passed through to the method controls.
An object of the same class as object, re-fitted using the
original arguments updated with any provided in .... All
unchanged parameters are preserved from the original call.
update(MIRT): Update method for MIRT objects.
Re-fits the MIRT model with modified arguments. Supports changing
model (e.g., m2pl -> m3pl), method (iStEM -> Stan),
D, Q.matrix, control.model, and
control.method.
update(MGPCM): Update method for MGPCM objects.
Re-fits the MGPCM model with modified arguments.
update(MGGUM): Update method for MGGUM objects.
Re-fits the MGGUM model with modified arguments.
update(FCMIRT): Update method for FCMIRT objects.
Re-fits the FCMIRT model with modified arguments. Supports changing
model, method, fc.type, block.items,
and control settings.
update(FCDCM): Update method for FCDCM objects.
Re-fits the FCDCM model with modified arguments. Supports changing
dcm.type, method, block.items, and control
settings.
update(FCGDINA): Update method for FCGDINA objects.
Re-fits the FCGDINA model with modified arguments.
update(FCGGUM): Update method for FCGGUM objects.
Re-fits the FCGGUM model with modified arguments.
update(TIRT): Update method for TIRT objects.
Re-fits the TIRT model with modified arguments. Supports changing
fc.type, method, pairs.value, and control
settings.
sim <- sim.data.MIRT(N = 20, I = 6, D = 2, model = "m2pl")
fit <- fit.MIRT(sim$response, model = "m2pl", D = 2, method = "iStEM",
control.method = list(
vis = FALSE, seed = 123,
M = 2, B = 2, burnin.maxitr = 2,
maxitr = 3, eps1 = 10, eps2 = 10,
estimate.se = FALSE))
# stan code, long time
# Switch to Stan estimation with more chains
fit_stan <- update(fit, method = "stan",
control.method = list(chains = 1, iter = 200))
# Change model to 3PL
fit_3pl <- update(fit, model = "m3pl")
# Adjust prior hyperparameters
fit_prior <- update(fit, control.model = list(a.mu = 0.5, a.sigma = 0.5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.