id_plot_irf  R Documentation 
This function will generate an impulse response function (IRF)
for a given covariate. The IRF shows the marginal impact of a 1unit
change in the covariate on a person's ideal point over time. To use
this function, the vary_ideal_pts
option in
id_estimate
must have received the 'AR1'
option
as IRFs are only available for the AR(1) autoregressive model.
id_plot_irf(
object,
cov_name = NULL,
label_high = "Liberal",
label_low = "Conservative",
pred_outcome = NULL,
recalc_vals = F,
include = NULL,
time_calc = 10,
time_label = "Time Points",
line_type = 2,
line_width = 1,
line_alpha = 1,
line_color = "red",
ci_color = "black",
ci_alpha = 0.5,
use_ci = TRUE,
high_quantile = 0.95,
low_quantile = 0.05,
calc_varying = T
)
object 
A fitted 
cov_name 
The name of the covariate to plot. Leave blank to select from a list of available covariates 
label_high 
The character label for the upper end of the latent scale 
label_low 
The character label for the lower end of the latent scale 
pred_outcome 
For discrete models with more than 2 categories,
or binary models with missing data, which outcome to predict. This should
be a character value that matches what the outcome was coded as in the data
passed to 
recalc_vals 
Whether to combine two variables into one through addition before
computing IRFs. If 
include 
A list of character names of person or group IDs for which to calculate IRFs 
time_calc 
The maximum number of time points over which to calculate the IRF 
time_label 
Character string specifying the type of time points (default is just

line_type 
The line type of the IRF line (see 
line_width 
The line width of the IRF line (see 
line_alpha 
The line alpha (transparency) of the IRF line (see 
line_color 
The color of the IRF line (see 
ci_color 
The color of the IRF credible interval (see 
ci_alpha 
The alpha of the IRF credible interval (see 
use_ci 
Whether or not to plot a credible interval around the lines 
high_quantile 
The upper limit of the posterior density to use for calculating credible intervals 
low_quantile 
The lower limit of the posterior density to use for calculating credible intervals 
calc_varying 
if 
a ggplot2
object that can be further customized if necessary
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.