draw_noise: Create a ggplot2 object with root-mean-square prediction...

Description Usage Arguments Value Author(s) References Examples

View source: R/draw_noise.R

Description

Create a ggplot2 object with root-mean-square prediction error from the conditional residuals for each subject in a study.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
draw_noise(
  rmse,
  facet_by = c("group_name", "fit"),
  exclude_NA = FALSE,
  ncol_value = maeve_options("ncol_value"),
  nrow_value = maeve_options("nrow_value"),
  geom_na_rm = maeve_options("geom_na_rm"),
  geom_point_size = maeve_options("geom_point_size"),
  alpha_value = maeve_options("alpha_value"),
  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"),
  title_label = maeve_options("title_label")
)

Arguments

rmse

data frame with factors for group and ID, and numerics for RMSE-by-ID from linear fit and spline fit. These four columns *MUST* be names "group", "ID", "RMSE_lin_resid_ID", "RMSE_gam_resid_ID" , respectively. Typically, this data.frame is the data.frame called 'RMSE_by_ID' returned from maeve::predict_study() by setting "return_list = TRUE" in the predict_study() call.

facet_by

character vector to determine whether to facet by group_name (default) or fit method.

exclude_NA

logical whether to drop missing RMSE values. Most often, this is because one of the two methods ('linear' or 'spline') simply was not fit.

ncol_value

numeric. See ?maeve_options().

nrow_value

numeric. See ?maeve_options().

geom_na_rm

logical. See ?maeve_options().

geom_point_size

numeric. See ?maeve_options().

alpha_value

numeric. See ?maeve_options().

axis_text_x_size

numeric. See ?maeve_options().

axis_text_x_angle

numeric. See ?maeve_options().

axis_text_x_hjust

numeric. See ?maeve_options().

axis_text_x_vjust

numeric. See ?maeve_options().

axis_text_y_size

numeric. See ?maeve_options().

strip_text_size

numeric. See ?maeve_options().

title_label

numeric. See ?maeve_options().

Value

A ggplot2 object

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
8
9
 cat('Example for draw_noise() in dontrun block.')
 ## Not run: 
 data( vismodegib )
 vismo21 <- dplyr::filter( vismodegib, DAY_OF_STUDY <= 21 )
 pred_list = vismo21 %>% model_study() %>% predict_study( return_list = TRUE )
 rmse = pred_list[[ 'RMSE_by_ID' ]]
 figure_of_noise <- draw_noise( rmse )

## End(Not run)

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