Skip to contents

Fit a Rasch model to REBL items using the eRm package. This creates a Rasch model object that can be used to calculate person parameters (REBL scores) and item parameters.

Usage

get_rasch_model(
  df,
  id,
  rebl_items,
  type = c("cml", "mml_constrained", "mml_con", "mml_unconstrained", "mml_uncon", "2pl",
    "tpm")
)

Arguments

df

A dataframe containing the REBL items and participant IDs

id

A character string specifying the column name containing participant IDs

rebl_items

A character vector of REBL item column names to include in the model. Get this with id_rebl_items() if you don't have it handy.

type

A string. cml = conditional maximum likelihood, mml_con = constrained maximum marginal likelihood, mml_uncon = unconstrained maximum marginal likelihoood, tpl = two parameter logistic model, tpm = three parameter logistic model. See details for more info.

Value

An eRm Rasch model object that can be passed to other functions like get_rebl_scores()

Details

Add some more details about what this means.

Examples

if (FALSE) { # \dontrun{
  # Get REBL items
  rebl_items <- id_rebl_items(raw_example, '^(?!res).*')

  # Fit Rasch model
  model <- get_rasch_model(raw_example, "id", rebl_items)
} # }