This function takes a model of the democracy scores and extracts the discrimination parameters, score cutpoints, and standard errors for all the variables involved, putting these into a tidy data frame.
Arguments
- model
- A mirt::SingleGroupClass model of the democracy scores. 
- type
- A string specifying the cutpoint type. Can be (an abbreviation of) "score" (for score cutpoints) or "discrimination" (for discrimination parameters). Default is "score." 
Value
A tibble::tibble() with either score cutpoints for each variable used to
construct the latent scores in terms of the latent variable (the default), or
discrimination parameters for each variable used to construct the index.
For the score cutpoints (type = 'score'), the columns
estimate, pct975, and pct025 report the IRT
parametrization of the model estimates, a normalized measure in the same
scale as the latent variable.
Examples
# \donttest{
# Replicate the official UDS 2011 release and calculate its cutpoints
library(dplyr)
library(mirt)
#> Loading required package: stats4
#> Loading required package: lattice
democracy_data <- generate_democracy_scores_dataset(
  selection = "_pmm", output_format = "wide", exclude_pmm_duplicates = FALSE
  )
#> Adding arat_pmm data
#> Adding blm_pmm data
#> Adding bollen_pmm data
#> Adding fh_pmm data
#> Adding hadenius_pmm data
#> Adding mainwaring_pmm data
#> Adding Munck data
#> Adding pacl_pmm data
#> Adding polity_pmm data
#> Adding polyarchy_pmm data
#> Adding prc_pmm data
#> Adding vanhanen_pmm data
democracy_data <- prepare_democracy_data(democracy_data)
replication_2011_model <- mirt(democracy_data |> 
  select(matches("pmm")), model = 1, itemtype = "graded", SE = TRUE, verbose = FALSE)
cutpoints(replication_2011_model)
#> # A tibble: 85 × 6
#>    variable   estimate  pct025    pct975      se num_obs
#>    <chr>         <dbl>   <dbl>     <dbl>   <dbl>   <int>
#>  1 pmm_arat   -1.43    -1.42   -1.44     0.00526    3873
#>  2 pmm_arat   -1.02    -1.02   -1.01     0.00150    3873
#>  3 pmm_arat   -0.427   -0.449  -0.403    0.0124     3873
#>  4 pmm_arat   -0.0422  -0.0795 -0.000821 0.0211     3873
#>  5 pmm_arat    0.421    0.357   0.491    0.0361     3873
#>  6 pmm_arat    1.42     1.28    1.58     0.0798     3873
#>  7 pmm_blm    -0.00364 -0.0451  0.0889   0.0472      275
#>  8 pmm_blm     0.473    0.219   1.04     0.290       275
#>  9 pmm_bollen -1.53    -1.50   -1.55     0.0145      510
#> 10 pmm_bollen -1.08    -1.07   -1.08     0.00243     510
#> # ℹ 75 more rows
# }