The update function provides a unified interface for refreshing or modifying existing analysis objects produced by the Qval package, including CDM, validation, and sim.data classes. By passing additional arguments, users can rerun fitting or simulation routines without reconstructing the entire object from scratch.

update(x, ...)

# S3 method for class 'CDM'
update(x, ...)

# S3 method for class 'validation'
update(x, ...)

# S3 method for class 'sim.data'
update(x, ...)

Arguments

x

An object of class CDM, validation, and sim.data.

...

Additional arguments specific to the method being updated:

  • For CDM: Y, Q, model, method, mono.constraint, maxitr, verbose.

  • For validation: Y, Q, CDM.obj, par.method, mono.constraint, model, method, search.method, iter.level, maxitr, eps, alpha.level, criter, verbose.

  • For sim.data: Q, N, IQ, model, distribute, control, verbose.

Value

An updated object of the same class as x, reflecting any changes in the supplied parameters.

Details

The update methods internally extract the original call arguments from the input object, combine them with any new parameters provided in ..., and re-invoke the corresponding constructor (CDM, validation, and sim.data). This approach ensures consistency and preserves all untouched settings from the original object.

Methods (by class)

  • update(CDM): Update method for CDM objects

  • update(validation): Update method for validation objects

  • update(sim.data): Update method for sim.data objects

Examples

set.seed(123)
library(Qval)

# \donttest{
################################################################
# Example 1: summary a CDM object                              #
################################################################
Q <- sim.Q(3, 20)
IQ <- list(P0 = runif(20, 0, 0.2), P1 = runif(20, 0.8, 1))
data.obj <- sim.data(Q, N = 500, IQ = IQ, 
                     model = "GDINA", distribute = "horder")
#> distribute =  horder 
#>  model =  GDINA 
#>  number of attributes:  3 
#>  number of items:  20 
#>  num of examinees:  500 
#>  average of P0 =  0.083 
#>  average of P1 =  0.894 
#> theta_mean =  -0.055 , theta_sd = 0.996 
#>  a =  1.5 1.5 1.5 
#>  b =  -1.5 1.5 0 
CDM.obj <- CDM(data.obj$dat, Q, model = "GDINA", method = "BM")
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 1  Max. abs. change = 0.47416  Deviance  = 10618.124                                                                                  
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 2  Max. abs. change = 0.08396  Deviance  = 8531.142                                                                                  
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 3  Max. abs. change = 0.01963  Deviance  = 8485.637                                                                                  
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 4  Max. abs. change = 0.01191  Deviance  = 8482.626                                                                                  
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 5  Max. abs. change = 0.01264  Deviance  = 8482.023                                                                                  
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 6  Max. abs. change = 0.01054  Deviance  = 8481.816                                                                                  
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 7  Max. abs. change = 0.00783  Deviance  = 8481.731                                                                                  
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 8  Max. abs. change = 0.00543  Deviance  = 8481.693                                                                                  
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 9  Max. abs. change = 0.00362  Deviance  = 8481.677                                                                                  
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 10  Max. abs. change = 0.00235  Deviance  = 8481.669                                                                                  
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 11  Max. abs. change = 0.00151  Deviance  = 8481.665                                                                                  
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 12  Max. abs. change = 0.00096  Deviance  = 8481.663                                                                                  
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 13  Max. abs. change = 0.00061  Deviance  = 8481.662                                                                                  
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 14  Max. abs. change = 0.00038  Deviance  = 8481.661                                                                                  
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 15  Max. abs. change = 0.00024  Deviance  = 8481.661                                                                                  
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 16  Max. abs. change = 0.00017  Deviance  = 8481.661                                                                                  
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hin >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> Warning: The old behavior for hinjac >= 0 has been deprecated. Please restate the inequality to be <=0. The ability to use the old behavior will be removed in a future release.
#> 
Iter = 17  Max. abs. change = 0.00010  Deviance  = 8481.661                                                                                  
summary(CDM.obj)
#> ==============================================
#>  Number of items       = 20 
#>  Number of attributes  = 3 
#>  Number of individuals = 500 
#> 
#> Model Fit:
#> Deviance     npar      AIC      BIC 
#> 8481.661   67.000 8615.661 8898.039 
#> 
#> Distribution of Alpha Patterns:
#>        000   001  010   011   100   101   110   111
#> freq    97    21  120   144     4     9    32    73
#> prop 0.194 0.042 0.24 0.288 0.008 0.018 0.064 0.146

CDM.updated <- update(CDM.obj, method = "EM", maxitr = 1000)
#> 
Iter = 1  Max. abs. change = 0.57951  Deviance  = 10238.69                                                                                  
Iter = 2  Max. abs. change = 0.09509  Deviance  = 8501.84                                                                                  
Iter = 3  Max. abs. change = 0.03995  Deviance  = 8478.24                                                                                  
Iter = 4  Max. abs. change = 0.01792  Deviance  = 8477.13                                                                                  
Iter = 5  Max. abs. change = 0.02604  Deviance  = 8477.02                                                                                  
Iter = 6  Max. abs. change = 0.01142  Deviance  = 8476.97                                                                                  
Iter = 7  Max. abs. change = 0.01740  Deviance  = 8476.96                                                                                  
Iter = 8  Max. abs. change = 0.00686  Deviance  = 8476.95                                                                                  
Iter = 9  Max. abs. change = 0.00466  Deviance  = 8476.94                                                                                  
Iter = 10  Max. abs. change = 0.00253  Deviance  = 8476.94                                                                                  
Iter = 11  Max. abs. change = 0.00030  Deviance  = 8476.94                                                                                  
Iter = 12  Max. abs. change = 0.00014  Deviance  = 8476.94                                                                                  
Iter = 13  Max. abs. change = 0.00016  Deviance  = 8476.94                                                                                  
Iter = 14  Max. abs. change = 0.00760  Deviance  = 8476.94                                                                                  
Iter = 15  Max. abs. change = 0.00246  Deviance  = 8476.94                                                                                  
Iter = 16  Max. abs. change = 0.00502  Deviance  = 8476.94                                                                                  
Iter = 17  Max. abs. change = 0.00017  Deviance  = 8476.94                                                                                  
Iter = 18  Max. abs. change = 0.00109  Deviance  = 8476.94                                                                                  
Iter = 19  Max. abs. change = 0.00004  Deviance  = 8476.94                                                                                  
summary(CDM.updated)
#> ==============================================
#>  Number of items       = 20 
#>  Number of attributes  = 3 
#>  Number of individuals = 500 
#> 
#> Model Fit:
#> Deviance     npar      AIC      BIC 
#> 8476.939   87.000 8650.939 9017.610 
#> 
#> Distribution of Alpha Patterns:
#>        000  001  010  011   100   101   110   111
#> freq    97   20  120  145     4    13    32    69
#> prop 0.194 0.04 0.24 0.29 0.008 0.026 0.064 0.138


################################################################
# Example 2: summary a validation object                       #
################################################################
MQ <- sim.MQ(Q, 0.1)
#> rate of mis-specifications =  0.1 
#>  rate of  over-specifications =  0.07 
#>  rate of under-specifications =  0.03 
CDM.obj2 <- CDM(data.obj$dat, MQ)
#> 
Iter = 1  Max. abs. change = 0.55372  Deviance  = 11376.15                                                                                  
Iter = 2  Max. abs. change = 0.20531  Deviance  = 8796.31                                                                                  
Iter = 3  Max. abs. change = 0.09493  Deviance  = 8725.28                                                                                  
Iter = 4  Max. abs. change = 0.02365  Deviance  = 8719.03                                                                                  
Iter = 5  Max. abs. change = 0.01674  Deviance  = 8718.11                                                                                  
Iter = 6  Max. abs. change = 0.01408  Deviance  = 8717.82                                                                                  
Iter = 7  Max. abs. change = 0.01043  Deviance  = 8717.68                                                                                  
Iter = 8  Max. abs. change = 0.00706  Deviance  = 8717.62                                                                                  
Iter = 9  Max. abs. change = 0.00454  Deviance  = 8717.58                                                                                  
Iter = 10  Max. abs. change = 0.00201  Deviance  = 8717.57                                                                                  
Iter = 11  Max. abs. change = 0.00717  Deviance  = 8717.56                                                                                  
Iter = 12  Max. abs. change = 0.00277  Deviance  = 8717.56                                                                                  
Iter = 13  Max. abs. change = 0.00088  Deviance  = 8717.56                                                                                  
Iter = 14  Max. abs. change = 0.00025  Deviance  = 8717.55                                                                                  
Iter = 15  Max. abs. change = 0.00016  Deviance  = 8717.55                                                                                  
Iter = 16  Max. abs. change = 0.00035  Deviance  = 8717.55                                                                                  
Iter = 17  Max. abs. change = 0.00021  Deviance  = 8717.55                                                                                  
Iter = 18  Max. abs. change = 0.00318  Deviance  = 8717.55                                                                                  
Iter = 19  Max. abs. change = 0.00007  Deviance  = 8717.55                                                                                  
validation.obj <- validation(data.obj$dat, MQ, CDM.obj2, 
                             method = "GDI")
#> GDI  method with  PAA  in  test  level iteration ...
#> Iter  =  1/  1,   9 items have changed, ΔPVAF=1.04934 
summary(validation.obj)
#> ==============================================
#> 
#> Suggested Q-matrix: 
#> 
#>         A1 A2 A3
#> item 1  0  1  0 
#> item 2  1  0  1 
#> item 3  1  0* 1 
#> item 4  0  0  1 
#> item 5  1* 0  1 
#> item 6  0* 0  1 
#> item 7  0  0  1 
#> item 8  0* 1  0 
#> item 9  0  0  1 
#> item 10 0* 1  1 
#> item 11 1  1  0*
#> item 12 0  1  1*
#> item 13 1  0  0 
#> item 14 0  0  1 
#> item 15 1  0* 0 
#> item 16 0  1  1 
#> item 17 1  1  1 
#> item 18 1  0  1 
#> item 19 0  1  0*
#> item 20 1  1  1 
#> Note: * denotes a modified element.

validation.updated <- update(validation.obj, method = "Hull")
#> Hull  method with  PAA  in  test  level iteration ...
#> Iter  =   1/   1, 12 items have changed, ΔPVAF=1.31187 
summary(validation.updated)
#> ==============================================
#> 
#> Suggested Q-matrix: 
#> 
#>         A1 A2 A3
#> item 1  0  1  1*
#> item 2  1  0  1 
#> item 3  1  0* 1 
#> item 4  0  0  1 
#> item 5  1* 0  1 
#> item 6  0* 0  1 
#> item 7  0  0  1 
#> item 8  0* 1  0 
#> item 9  0  0  1 
#> item 10 0* 1  1 
#> item 11 1  1  0*
#> item 12 0  1  1*
#> item 13 1  0  0 
#> item 14 0  0  1 
#> item 15 1  0* 0 
#> item 16 0  1  1 
#> item 17 0* 1  0*
#> item 18 1  0  1 
#> item 19 0  1  0*
#> item 20 1  1  0*
#> Note: * denotes a modified element.


################################################################
# Example 3: summary a sim.data object                         #
################################################################
data.obj2 <- sim.data(Q = sim.Q(3, 10), N = 1000)
#> distribute =  uniform 
#>  model =  GDINA 
#>  number of attributes:  3 
#>  number of items:  10 
#>  num of examinees:  1000 
#>  average of P0 =  0.134 
#>  average of P1 =  0.865 
summary(data.obj2)
#> ==============================================
#>  Number of items       = 10 
#>  Number of attributes  = 3 
#>  Number of individuals = 1000 
#> 
#> Distribution of Alpha Patterns:
#>        000   001   010   011   100   101  110   111
#> freq   134   106   119   117   127   139  130   128
#> prop 0.134 0.106 0.119 0.117 0.127 0.139 0.13 0.128

data.updated <- update(data.obj2, N = 200)
#> distribute =  uniform 
#>  model =  GDINA 
#>  number of attributes:  3 
#>  number of items:  10 
#>  num of examinees:  200 
#>  average of P0 =  0.124 
#>  average of P1 =  0.876 
summary(data.updated)
#> ==============================================
#>  Number of items       = 10 
#>  Number of attributes  = 3 
#>  Number of individuals = 200 
#> 
#> Distribution of Alpha Patterns:
#>        000  001  010   011  100  101  110  111
#> freq    29   30   22    27   24   22   24   22
#> prop 0.145 0.15 0.11 0.135 0.12 0.11 0.12 0.11
# }