Dexter

Dexter is an R package for psychometric analysis of data from educational and psychological tests. Dexter typically works with project database files saved on disk.

Installation

install.packages('dexter')

If you encounter a bug, please post a minimal reproducible example on github. We post news and examples on a website and blog.

Example

library(dexter)
# start a project and fill it with data
# verbAggrRules and verbAggrData are example datasets provided with dexter

db = start_new_project(verbAggrRules, "verbAggression.db")
add_booklet(db, verbAggrData, booklet_id = "verb_agg")

# Classical test theory
tia = tia_tables(db)

tia$booklets
booklet_id n_items alpha mean_pvalue mean_rit mean_rir max_booklet_score n_persons
verb_agg 24 0.888 0.339 0.527 0.468 48 316
head(tia$items)
booklet_id item_id mean_score sd_score max_score pvalue rit rir n_persons
verb_agg S1DoCurse 1.082 0.807 2 0.541 0.582 0.519 316
verb_agg S1DoScold 0.832 0.815 2 0.416 0.651 0.596 316
verb_agg S1DoShout 0.468 0.709 2 0.234 0.520 0.460 316
verb_agg S1WantCurse 1.123 0.827 2 0.562 0.537 0.468 316
verb_agg S1WantScold 0.930 0.850 2 0.465 0.593 0.528 316
verb_agg S1WantShout 0.712 0.777 2 0.356 0.529 0.464 316
# IRT, extended nominal response model
f = fit_enorm(db)

head(coef(f))
item_id item_score beta SE_beta
S1DoCurse 1 -1.3422140 0.1541565
S1DoCurse 2 -0.6375015 0.1418423
S1DoScold 1 -0.6702036 0.1429057
S1DoScold 2 -0.2589855 0.1579467
S1DoShout 1 0.3254326 0.1480166
S1DoShout 2 0.3687574 0.2099654
# ability estimates per person
abl = ability(db, parms = f)
head(abl)
booklet_id person_id booklet_score theta
verb_agg dx_0000001 13 -1.0238738
verb_agg dx_0000002 28 0.3124831
verb_agg dx_0000003 4 -2.3748882
verb_agg dx_0000004 19 -0.4630604
verb_agg dx_0000005 7 -1.7721275
verb_agg dx_0000006 25 0.0512826
# ability estimates without item S1DoScold
abl2 = ability(db, parms = f, item_id != "S1DoScold")

# plausible values

pv = plausible_values(db, parms = f, nPV = 5)
head(pv)
booklet_id person_id booklet_score PV1 PV2 PV3 PV4 PV5
verb_agg dx_0000001 13 -1.1129358 -0.3718473 -0.6251660 -1.0861430 -1.4627665
verb_agg dx_0000002 28 -0.0643628 0.1312981 -0.6255087 -0.1063878 0.3527158
verb_agg dx_0000003 4 -1.8603752 -2.5817701 -1.6376942 -1.7172643 -1.8129040
verb_agg dx_0000004 19 -1.0663677 -0.6810231 -1.1512542 -0.9481833 -0.8004328
verb_agg dx_0000005 7 -2.0083386 -1.5279208 -1.3307093 -1.5430697 -1.3224421
verb_agg dx_0000006 25 0.2020330 0.2050144 0.2221347 -0.4249511 0.0809038