Estimate the parameters of the Interaction model and the Rasch model

fit_inter(dataSrc, predicate = NULL)

Arguments

dataSrc

a connection to a dexter database, a matrix, or a data.frame with columns: person_id, item_id, item_score

predicate

An optional expression to subset data, if NULL all data is used

Value

An object of class rim holding results for the Rasch model and the interaction model.

Details

Unlike the Rasch model, the interaction model cannot be computed concurrently for a whole design of test forms. This function therefore fits the Rasch model and the interaction model on complete data. This typically consist of responses to items in one booklet but can also consist of the intersection (common items) in two or more booklets. If the intersection is empty (no common items for all persons), the function will exit with an error message.

See also

Examples


 RcppArmadillo::armadillo_throttle_cores(1)

db = start_new_project(verbAggrRules, ":memory:")
add_booklet(db, verbAggrData, "agg")
#> no column `person_id` provided, automatically generating unique person id's
#> $items
#>  [1] "S1DoCurse"   "S1DoScold"   "S1DoShout"   "S1WantCurse" "S1WantScold"
#>  [6] "S1WantShout" "S2DoCurse"   "S2DoScold"   "S2DoShout"   "S2WantCurse"
#> [11] "S2WantScold" "S2WantShout" "S3DoCurse"   "S3DoScold"   "S3DoShout"  
#> [16] "S3WantCurse" "S3WantScold" "S3WantShout" "S4DoCurse"   "S4DoScold"  
#> [21] "S4DoShout"   "S4WantCurse" "S4WantScold" "S4WantShout"
#> 
#> $person_properties
#> character(0)
#> 
#> $columns_ignored
#> [1] "gender" "anger" 
#> 

m = fit_inter(db, booklet_id=='agg')
plot(m, "S1DoScold", show.observed=TRUE)


close_project(db)

 RcppArmadillo::armadillo_reset_cores()