plot_ppc: Creates a PPC plot for a single dataset

View source: R/plotting.r

plot_ppcR Documentation

Creates a PPC plot for a single dataset

Description

A sample of parameters representing the uncertainty within the dataset is passed to the function. All parameter combinations and exposure patterns are simulated and the range of predicted frond numbers is derived for a single study. The uncertainty is displayed by a Posterior Predictive Plot (PPC). The data (rs_mean, obs_mean and obs_full) must have the following format (col1 = time, col2 = data of interest, col3 = trial name). Data for uncertainties (rs_range) must have the format: col1 = time, col2 = lower boundaries, col3 = upper boundaries, col4 = trial. The user should take care of the input data and consider whether control data and data at time zero should be included in the model check.

Usage

plot_ppc(
  rs_mean,
  rs_range,
  col_number = 2,
  obs_mean = NULL,
  obs_full = NULL,
  xy_lim = NULL,
  study = NULL
)

Arguments

rs_mean

data.frame, model results best fit params

rs_range

data.frame, predictions (min, max from param.sample run)

col_number

column to plot, default = 2

obs_mean

data.frame, observations with means per treatment level

obs_full

data.frame, full data set including results for replicates

xy_lim

optional numeric, limits of x and y axis for plotting

study

optional string, name of study which can be used as key

Value

a ggplot2 plot object


cvasi documentation built on Sept. 23, 2024, 9:08 a.m.