Exploratory test for Differential Item Functioning

DIF(dataSrc, person_property, predicate = NULL)

Arguments

dataSrc

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

person_property

Defines groups of persons to calculate DIF

predicate

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

Value

An object of class DIF_stats holding statistics for overall-DIF and a matrix of statistics for DIF in the relative position of item-category parameters in the beta-parameterization where they represent locations on the ability scale where adjacent categories are equally likely. If there is DIF, the function `plot` can be used to produce an image of the pairwise DIF statistics.

Details

Tests for equality of relative item/category difficulties across groups. Supplements the confirmatory approach of the profile plot.

References

Bechger, T. M. and Maris, G (2015); A Statistical Test for Differential Item Pair Functioning. Psychometrika. Vol. 80, no. 2, 317-340.

See also

A plot of the result is produced by the function plot.DIF_stats

Examples


 RcppArmadillo::armadillo_throttle_cores(1)

db = start_new_project(verbAggrRules, ":memory:", person_properties=list(gender='unknown'))
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
#> [1] "gender"
#> 
#> $columns_ignored
#> [1] "anger"
#> 
dd = DIF(db,person_property="gender")
print(dd)
#> Test for DIF: Chi-square = 114.752, df = 47, p = < 0.0006
plot(dd)

str(dd)
#> List of 5
#>  $ DIF_overall :List of 3
#>   ..$ stat: num 115
#>   ..$ df  : num 47
#>   ..$ p   : num 1.36e-07
#>  $ DIF_pair    : num [1:48, 1:48] 0 -0.603 -0.77 -0.789 0.103 ...
#>  $ Delta_R     : num [1:48, 1:48] 0 -0.3571 -0.397 -0.4113 0.0522 ...
#>  $ group_labels: chr [1:2] "Female" "Male"
#>  $ items       :'data.frame':	48 obs. of  2 variables:
#>   ..$ item_id   : chr [1:48] "S1DoCurse" "S1DoCurse" "S1DoScold" "S1DoScold" ...
#>   ..$ item_score: int [1:48] 1 2 1 2 1 2 1 2 1 2 ...
#>  - attr(*, "class")= chr [1:2] "DIF_stats" "list"

close_project(db)

 RcppArmadillo::armadillo_reset_cores()