plot-method.Rd
dgirt_plot
plots estimates from a dgo model. plot_rhats
plots
split R-hats.
dgirt_plot(x, ...) # S4 method for dgo_fit dgirt_plot(x, y_fun = "median", y_min = "q_025", y_max = "q_975", pars = "theta_bar") # S4 method for data.frame dgirt_plot(x, group_name, time_name, geo_name, y_fun = "median", y_min = "q_025", y_max = "q_975") # S4 method for dgo_fit,missing plot(x, y, ...) plot_rhats(x, ...) # S4 method for dgo_fit plot_rhats(x, pars = "theta_bar", facet_vars = NULL, shape_var = NULL, color_var = NULL, x_var = NULL)
x | A |
---|---|
... | Further arguments to |
y_fun | Summary function to be plotted as |
y_min | Summary function giving the |
y_max | Summary function giving the |
pars | Selected parameter. |
group_name | A discrete grouping variable that will be passed to the
|
time_name | A time variable with numeric values that will be plotted on the x axis. |
geo_name | A variable representing local areas that will be used in faceting. |
y | Ignored. |
facet_vars | Optionally, one or more variables passed to |
shape_var, color_var, x_var | Optionally, a variable passed to the
|
# NOT RUN { data(toy_dgirtfit) dgirt_plot(toy_dgirtfit) dgirt_plot(toy_dgirtfit, y_min = NULL, y_max = NULL) p <- dgirt_plot(toy_dgirtfit) p %+% ylab("posterior median") # }# NOT RUN { data(toy_dgirtfit) ps <- poststratify(toy_dgirtfit, annual_state_race_targets, strata_names = c("state", "year"), aggregated_names = "race3") dgirt_plot(ps, group_name = NULL, time_name = "year", geo_name = "state") # }# NOT RUN { data(toy_dgirtfit) plot(toy_dgirtfit) # }# NOT RUN { data(toy_dgirtfit) plot_rhats(toy_dgirtfit) plot_rhats(toy_dgirtfit, facet_vars = "race3") + scale_x_continuous(breaks = seq.int(2006, 2008)) # }