Profile plot

profile_plot(
dataSrc,
item_property,
covariate,
predicate = NULL,
model = c("IM", "RM"),
x = NULL,
col = NULL,
col.diagonal = "lightgray",
...
)

## Arguments

dataSrc

a connection to a dexter database or a data.frame with columns: person_id, item_id, item_score and the item_property and the covariate of interest.

item_property

The name of the item property defining the domains. The item property should have exactly two distinct values in your data

covariate

name of the person property used to create the groups. There will be one line for each distinct value.

predicate

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

model

"IM" (default) or "RM" where "IM" is the interaction model and "RM" the Rasch model. The interaction model is the default as it fits the data better or at least as good as the Rasch model.

x

Which value of the item_property to draw on the x axis, if NULL, one is chosen automatically

col

vector of colors to use for plotting

col.diagonal

color of the diagonal lines representing the testscores

...

further arguments to plot

## Details

Profile plots can be used to investigate whether two (or more) groups of respondents attain the same test score in the same way. The user must provide a (meaningful) classification of the items in two non-overlapping subsets such that the test score is the sum of the scores on the subsets. The plot shows the probabilities to obtain any combinations of subset scores with thin gray lines indicating the combinations that give the same test score. The thick lines connect the most likely combination for each test score in each group. When applied to educational test data, the plots can be used to detect differences in the relative difficulty of (sets of) items for respondents that belong to different groups and are matched on the test score. This provides a content-driven way to investigate differential item functioning.

## Examples

db = start_new_project(verbAggrRules, ":memory:",
person_properties=list(gender="unknown"))
#> 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"
#>