dgirt and dgmrp make calls to stan with the Stan code and data for their respective models.

dgirt(shaped_data, ..., separate_t = FALSE, delta_tbar_prior_mean = 0.65,
  delta_tbar_prior_sd = 0.25, innov_sd_delta_scale = 2.5,
  innov_sd_theta_scale = 2.5, version = "2017_01_04",
  hierarchical_model = TRUE, model = NULL)

dgmrp(shaped_data, ..., separate_t = FALSE, delta_tbar_prior_mean = 0.65,
  delta_tbar_prior_sd = 0.25, innov_sd_delta_scale = 2.5,
  innov_sd_theta_scale = 2.5, version = "2017_01_04_singleissue",
  model = NULL)

Arguments

shaped_data

Output from shape.

...

Further arguments, passed to stan.

separate_t

Whether smoothing of estimates over time should be disabled. Default FALSE.

delta_tbar_prior_mean

Prior mean for delta_tbar, the normal weight on theta_bar in the previous period. Default 0.65.

delta_tbar_prior_sd

Prior standard deviation for delta_bar. Default 0.25.

innov_sd_delta_scale

Prior scale for sd_innov_delta, the Cauchy innovation standard deviation of nu_geo and delta_gamma. Default 2.5.

innov_sd_theta_scale

Prior scale for sd_innov_theta, the Cauchy innovation standard deviation of gamma, xi, and if constant_item is FALSE the item difficulty diff. Default 2.5.

version

The name of the dgo model to estimate, or the path to a .stan file. Valid names for dgo models are "2017_01_04", "2017_01_04_singleissue". Ignored if argument model is used.

hierarchical_model

Whether a hierarchical model should be used to smooth the group IRT estimates. If set to FALSE, the model will return raw group-IRT model estimates for each group. Default TRUE.

model

A Stan model object of class stanmodel to be used in estimation. Specifying this argument avoids repeated model compilation. Note that the Stan model object for a model fitted with dgirt() or dgmrp() can be found in the the stanmodel slot of the resulting dgirt_fit or dgmrp_fit object.

Value

A dgo_fit-class object that extends stanfit-class.

Details

The user will typically pass further arguments to stan via the ... argument, at a minimum iter and cores.

By default dgirt and dgmrp override the stan default for its pars argument to specify typical parameters of interest. They also set iter_r to 1L.

Important: the dgirt model assumes consistent coding of the polarity of item responses for identification.