id_plot_cov | R Documentation |
This function will calculate and plot the ideal point marginal effects, or the first derivative
of the IRT/ideal point model with respect to the hierarchical covariate,
for each item in the model. The function id_me()
is used
to first calculate the ideal point marginal effects.
id_plot_cov(
object,
calc_param = NULL,
label_high = "High",
label_low = "Low",
group_effects = NULL,
plot_model_id = NULL,
pred_outcome = NULL,
lb = 0.05,
upb = 0.95,
facet_ncol = 2,
cov_type = "person_cov",
...
)
object |
A fitted |
calc_param |
Whether to calculate ideal point marginal effects for
a given covariate. If NULL, the default, the function will instead produce
a plot of the raw coefficients from the ideal point model. If passing the
name of a covariate, should be a character value of a column in the data
passed to the
|
label_high |
What label to use on the plot for the high end of the latent scale |
label_low |
What label to use on the plot for the low end of the latent scale |
group_effects |
Character value for name of column in data by which to subset the data. Must be a column passed to the id_make function |
plot_model_id |
The integer of the model ID to plot. If NULL and there
are multiple model types, |
pred_outcome |
For discrete models with more than 2 categories,
or binary models with missing data, which outcome to predict. This should
be the value that matches what the outcome was coded as in the data
passed to |
lb |
The lower limit of the posterior density to use for calculating credible intervals |
upb |
The upper limit of the posterior density to use for calculating credible intervals |
facet_ncol |
If facetting by multiple models or grouped factors, sets the number of columns in the multiple plots |
cov_type |
Either |
... |
Additional argument passed on to |
The ends of the latent variable can be specified via the
label_low
and label_high
options, which will use those
labels for item discrimination.
Note that the function produces a ggplot2
object, which can
be further modified with ggplot2
functions.
A ggplot2
plot that can be further customized with ggplot2
functions if need be.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.