plot_pass.Rd
This function produces a canned ggplot
object.
plot_pass(
pass,
data_rug = NULL,
items = NULL,
item_var = "item",
response_var = "response",
x_var = "a",
by_var = "cohort",
min_n = 10,
model_name = "",
xlim = NULL,
xbreaks = NULL,
xlab = NULL,
label_trunc = 60,
col_manual = NULL,
na_value = "grey"
)
A data.frame
with empirical probabilities per item.
For age, the expected columns are item
, cohort
, p
, a
, n
,
equate
and label
.
For D-score, the expected columns are item
, cohort
, dcut
, p
, d
,
n
, equate
and label
.
Optional data frame of individual responses to the item,
used to add rug plots. Should include item
, age
/dscore
,
response
and cohort
.
Character vector with item names. If not specified, all columns in the data are included as items (for wide shape) or all items in the item column are included (for long shape).
Only relevant for long shape. Character string with the
name of the column containing item names. The default is item_var = "item"
.
Only relevant for long shape. Character string with
the name of the column containing responses. The default is
response_var = "response"
.
Variable representing the continuous x-axis (e.g., age in months, or D-score).
Variable by which to group the data for plotting (e.g. cohort).
Minimum number of observations required to include a point. Defaults to 10.
Optional model name used as annotation in the plot.
Numeric vector of length 2 specifying x-axis limits (in months).
Sequence of breaks for the x-axis.
Label for the x-axis.
Maximum length of the item label to display.
Optional named vector of manual colors by cohort
.
If NULL
, colors are obtained using get_palette()
.
Color to use for missing values. Default is "grey"
.
A ggplot
object.