Description Usage Arguments Value Examples

The eirm function estimates explanatory item response models with item-related and
person-related covariates. The function requires the data to be in a long format where
items are nested within persons. If item responses are polytomous, then the data has to
be reformatted using the `polyreformat`

function.

1 2 3 4 5 6 7 8 9 10 11 12 13 |

`formula` |
A regression-like formula that defines item responses as a dependent variable and explanatory predictors as independent predictors. For example, "response ~ -1 + predictor1 + predictor2". Use -1 in the formula to avoid the estimation of an intercept parameter. |

`data` |
A data frame in a long format where there are multiple rows for each person (i.e., nested data). The data should involve a variable that represents item responses, a variable that represents persons, and additional predictors to be used for 'explaining' item responses. |

`engine` |
Estimation engine with the options of either "lme4" (default) or "blme". |

`na.action` |
How missing data should be handled (default: "na.omit"). |

`weights` |
Weights to be used in the estimation. |

`mustart, etastart` |
Model specification arguments for glmer. See |

`cov.prior` |
A BLME prior or list of priors with the options of "wishart" (default), "invwishart", "gamma", "invgamma", or NULL to impose a prior over the covariance of the random effects. Not used when engine = "lme4". |

`fixef.prior` |
A BLME prior of family "normal", "t", "horseshoe", or NULL (default) to impose a prior over the fixed effects. Not used when engine = "lme4". |

`control` |
Control settings for the glmer function in lme4. Note that the optimx package is used by default to speed up the estimation. For higher accuracy in the results, the default lme4 optimizers can be used. |

An eirm-class list that includes the EIRM formula used for the estimation, estimated parameters in the model, ability estimates for persons and other random effects (if any), and the complete set of results returned from the glmer function. These results can be used for further analysis and graphics based on lme4.

1 2 3 4 5 6 7 8 9 | ```
data("VerbAgg")
mod0 <- eirm(formula = "r2 ~ -1 + situ + btype + (1|id)", data = VerbAgg)
print(mod0) # To get easiness parameters
print(mod0, difficulty = TRUE) # To get difficulty parameters
plot(mod0)
mod1 <- eirm(formula = "r2 ~ -1 + situ + btype + mode + (1|id)", data = VerbAgg)
print(mod1) # To get easiness parameters
print(mod1, difficulty = TRUE) # To get difficulty parameters
plot(mod1)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.