Data frames specified in arguments df_data, df_signal, df_fit, and df_fit_err must have a format where

• the first column is the grouping factor (usually id)

• the second column is the x-axis variable (usually age)

• a column named y must contain the y-axis variable (not for df_fit_err)

• a column named lower (upper) must contain the lower (upper) bound of error bar (only for df_fit_err)

• a column named draw must be a factor that specifies the posterior draw using which the fit has been computed (only for df_fit)

plot_api_g(
df_data,
df_signal = NULL,
df = NULL,
df_err = NULL,
teff_signal = NULL,
teff_obs = NULL,
i_test = NULL,
color_signal = color_palette(2)[1],
color = color_palette(2)[2],
color_err = colorset("red", "light_highlight"),
color_vlines = colorset("gray", "mid_highlight"),
alpha = 1,
alpha_err = 0.5,
nrow = NULL,
ncol = NULL,
y_transform = function(x) x
)

Arguments

df_data A data frame containing the observations. A data frame containing the true signal. Omitted if NULL. A data frame containing the model fit, or a list of data frames. The list version can be used for example so that each list element corresponds to the fit computed using one parameter draw. Omitted if NULL. A data frame containing error bars. Omitted if NULL. Must be NULL if df_fit is a list. A named vector containing true effect times used to generate the signal. Omitted if NULL. A named vector containing observed effect times. Omitted if NULL. Indices of test points. Line color for true signal. Line color for model fit. Color of the error ribbon. Two line colors for vertical lines (true and obs. effect time). Line opacity for model fit. Opacity of the error ribbon. number of rows, an argument for facet_wrap number of columns, an argument for facet_wrap A function to be applied to the third column of df_data.

Value

A ggplot object.

Other internal plot API functions: plot_api_c()