compare_groups: Compare groups from fitted models and return confidence...

Description Usage Arguments Value Author(s) References Examples

View source: R/compare_groups.R

Description

Compare groups from fitted models and return confidence intervals & figures

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
compare_groups(
  model_list,
  xmin = NULL,
  xmax = NULL,
  custom_contrast = NULL,
  subtract_starting_value = TRUE,
  conf_level = 0.95,
  adjustment_method = c("single-step", "Shaffer", "Westfall", "free", "holm",
    "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none"),
  extended_output = FALSE,
  draw_figures = TRUE,
  facet_wrap_scales = c("fixed", "free_y", "free_x", "free"),
  study_ID_value = "",
  reference_Dunnett = maeve_options("reference_Dunnett"),
  modeling_data_frame = maeve_options("modeling_data_frame"),
  metric = maeve_options("metric"),
  break_points = maeve_options("break_points"),
  poly_degree = maeve_options("poly_degree"),
  progress = maeve_options("progress"),
  contrast = maeve_options("contrast"),
  xrange_norm_method = maeve_options("xrange_norm_method"),
  N_integration_grid = maeve_options("N_integration_grid"),
  truncated_group_levels = maeve_options("truncated_group_levels"),
  geom_na_rm = maeve_options("geom_na_rm"),
  axis_text_x_size = maeve_options("axis_text_x_size"),
  axis_text_x_angle = maeve_options("axis_text_x_angle"),
  axis_text_x_hjust = maeve_options("axis_text_x_hjust"),
  axis_text_x_vjust = maeve_options("axis_text_x_vjust"),
  axis_text_y_size = maeve_options("axis_text_y_size"),
  strip_text_size = maeve_options("strip_text_size"),
  legend_text_size = maeve_options("legend_text_size"),
  legend_position_char = maeve_options("legend_position_char")
)

Arguments

model_list

R list with model objects from maeve::model_study().

xmin

numeric lower bound of definite integral

xmax

numeric upper bound of definite integral

custom_contrast

numeric matrix of contrasts with number of columns equal to number of treatment groups and number of rows equal to desired number of contrasts. Column names must equal treatment group names.

subtract_starting_value

logical: Subtract from all computed AUCs the spline fit at xmin for that group.

conf_level

numeric value in (0,1) to determine the level of confidence intervals returned.

adjustment_method

character string specifying a method for p-value adjustment. Setting to 'none' will return unadjusted p-values and confidence intervals. Setting to anything else (the default is 'single_step') will implement a particular p-value adjustment from multcomp. Although the p-value adjustment method varies for different options of this parameter, all the options other than 'none' will return the same FWER- or FDR-adjusted confidence intervals implemented via setting "calpha = multcomp:::adjusted_calpha()" in "multcomp:::confint.glht()". Setting adjustment_method = 'none' will return confidence intervals with "calpha = multcomp:::univariate_calpha()" in "multcomp:::confint.glht()".

extended_output

logical determining whether to compute extra output to return to a DIVOS summary table.

draw_figures

logical determining whether to draw figures. If FALSE, then NULL is returned for each figure.

facet_wrap_scales

character string passed to "ggplot::facet_wrap( ..., scales = ...)" giving scales parameter. Usually 'fixed' or 'free_y' here.

study_ID_value

character string with five digit DIVOS study ID, OR a DivoStudy object.

reference_Dunnett

character. See ?maeve_options() for documentation.

modeling_data_frame

data.frame. See ?maeve_options().

metric

character. See ?maeve_options() for documentation.

break_points

numeric vector. See ?maeve_options().

poly_degree

numeric. See ?maeve_options().

progress

logical. See ?maeve_options() for documentation.

contrast

character. See ?maeve_options() for documentation.

xrange_norm_method

character. See ?maeve_options() for documentation.

N_integration_grid

numeric. See ?maeve_options() for documentation.

truncated_group_levels

character. See ?maeve_options() for documentation.

geom_na_rm

logical. See ?maeve_options() for documentation.

axis_text_x_size

numeric. See ?maeve_options() for documentation.

axis_text_x_angle

numeric. See ?maeve_options() for documentation.

axis_text_x_hjust

numeric. See ?maeve_options() for documentation.

axis_text_x_vjust

numeric. See ?maeve_options() for documentation.

axis_text_y_size

numeric. See ?maeve_options() for documentation.

strip_text_size

numeric. See ?maeve_options() for documentation.

legend_text_size

numeric. See ?maeve_options() for documentation.

legend_position_char

character. See ?maeve_options() for documentation.

Value

An R list with named output.

Author(s)

Bill Forrest <forrest@gene.com>

Bill Forrest forrest@gene.com

References

www.r-project.org

Examples

1
2
3
4
5
6
7
 ### cat('Currently no running example for compare_groups(). See "\dontrun()" text.')
 ## Not run: 
  data( vismodegib )
  vismo21 <- dplyr::filter( vismodegib, DAY_OF_STUDY <= 21 )
  cg_out  <- vismo21 %>% maeve::model_study() %>% maeve::compare_groups()

## End(Not run)

wfforrest/maeve documentation built on Jan. 1, 2021, 12:47 p.m.