calc_rng_VPC: Calculation of range VPC.

Description Usage Arguments Value Note Author(s)

View source: R/calc_rng_VPC.R

Description

Runs calculations for a more simple version of a VPC where typically, within each bin, the 5th, 50th and 95th percentiles of the experimental data are calculated along with the central 90% range of the simulated data (90% prediction interval). Calculations are run as non-prediction-corrected and prediction-corrected.

Usage

1
2
3
calc_rng_VPC(exp_data, sim_data, bins, dv_col = "DV", ind_var_col = "TAD",
  exp_quantiles = c(0.05, 0.5, 0.95), prediction_interval = 90,
  min_bin_width = 0.5)

Arguments

exp_data

data frame containing experimental data.

sim_data

data frame containing all simulated data.

bins

vector of limits of the time bins.

dv_col

name of column containing DV, for both exp_data and sim_data.

ind_var_col

name of column containing independent variable (e.g. TAD or TIME), for both exp_data and sim_data.

exp_quantiles

vector of required quantiles of experimental DV in each bin.

prediction_interval

numeric. Percentage size of prediction interval calculated around all data in each bin of simulated data.

min_bin_width

numeric. Width of the smallest possible unrestricted bin (bins will be restricted in width by neighbouring bins). It can be adjusted to improve the look of the VPC plot.

Value

A list containing all necessary range VPC parameters to be used in plot_rng_VPC function.

Note

This function has not been designed for bins containing zero points, and may fail or produce strange results if zero points are detected.

Author(s)

Rupert Austin


jgrevel/BAST1-R-Library documentation built on May 21, 2019, 10:11 a.m.