util_margins_ord {dataquieR} | R Documentation |
Utility function to create a plot similar to the margins plots for ordinal variables
Description
This function is still under development. It uses the ordinal
package to
compute ordered regression models.
Usage
util_margins_ord(
resp_vars = NULL,
group_vars = NULL,
co_vars = NULL,
min_obs_in_subgroup = 5,
min_subgroups = 5,
ds1,
label_col,
adjusted_hint = "",
title = "",
sort_group_var_levels = getOption("dataquieR.acc_margins_sort",
dataquieR.acc_margins_sort_default)
)
Arguments
resp_vars |
variable the name of the ordinal measurement variable |
group_vars |
variable the name of the observer, device or reader variable |
co_vars |
variable list a vector of covariables, e.g. age and sex for adjustment |
min_obs_in_subgroup |
integer from=0. This optional argument specifies
the minimum number of observations that is required to
include a subgroup (level) of the |
min_subgroups |
integer from=3. The model provided by the |
ds1 |
data.frame the data frame that contains the measurements, after
replacing missing value codes by |
label_col |
variable attribute the name of the column in the metadata with labels of variables |
adjusted_hint |
character hint, if adjusted for |
title |
character title for the plot |
sort_group_var_levels |
logical Should the levels of the grouping variable be sorted descending by the number of observations (in the figure)? |
Value
A table and a matching plot.