democracy_model: Produce a UD model from democracy data

Description Usage Arguments Value Examples

Description

This function is a simple wrapper for mirt::mirt that automates the process of selecting the relevant columns in the democracy dataset, preparing the data for use with mirt::mirt, and packaging the result in a form useful for democracy_scores. More fine-grained control can be achieved by using mirt directly; see the Vignette on replicating and extending the UD scores.

Usage

1
2
3
democracy_model(..., identifiers = c("extended_country_name", "year", "GWn",
  "cown", "polity_ccode", "uds_2010_mean", "uds_2011_mean", "uds_2014_mean",
  "in_GW_system"), verbose = TRUE, technical = list(NCYCLES = 2500))

Arguments

...

democracy variables to use for the model. Can be bare column names or strings, or a dplyr::select expression.

identifiers

Identifier columns. Can be any combination of columns in the democracy dataset. Defaults to c("extended_country_name", "year", "GWn", "cown", "polity_ccode", "uds_2010_mean", "uds_2011_mean", "uds_2014_mean").

verbose

Passed to mirt::mirt; whether to print a running commentary. Default is TRUE.

technical

Passed to mirt::mirt. Defaults to list(NCYCLES = 2500) to ensure that extende models converge.

Value

a SingleGroupClass-class model of latent democracy scores suitable for use by democracy_scores.

Examples

1
2
3
replication_2011_model <- democracy_model(dplyr::matches("pmm"), verbose = FALSE)
replication_2011_model
summary(replication_2011_model)

xmarquez/QuickUDS documentation built on May 4, 2019, 1:24 p.m.