dot-extractAggregatedSimulatedData: Extract aggregated simulated data

.extractAggregatedSimulatedDataR Documentation

Extract aggregated simulated data

Description

Extract aggregated simulated data

Usage

.extractAggregatedSimulatedData(simData, aggregation = "quantiles", ...)

Arguments

simData

A data frame with simulated data from DataCombined$toDataFrame().

aggregation

The type of the aggregation of individual data. One of quantiles (Default), arithmetic or geometric (full list in ospsuite::DataAggregationMethods). Will replace yValues by the median, arithmetic or geometric average and add a set of upper and lower bounds (yValuesLower and yValuesHigher).

...

Arguments passed on to .normRange

nsd

optional argument defining the number of standard deviation to add and substract to the mean

quantiles

A numerical vector with quantile values (Default: c(0.05, 0.50, 0.95)) to be plotted. Ignored if aggregation is not quantiles.

Details

The simulated values will be aggregated across individuals for each time point.

For aggregation = quantiles (default), the quantile values defined in the argument quantiles will be used. In the profile plot, the middle value will be used to draw a line, while the lower and upper values will be used as the lower und upper ranges. For aggregation = arithmetic, arithmetic mean with arithmetic standard deviation (SD) will be plotted. Use the optional parameter nsd to change the number of SD to plot above and below the mean. For aggregation = geometric, geometric mean with geometric standard deviation (SD) will be plotted. Use the optional parameter nsd to change the number of SD to plot above and below the mean.

See Also

Other utilities-plotting: .addMissingGroupings(), .convertGeneralToSpecificPlotConfiguration(), .createAxesLabels()

Examples


# let's create a data frame to test this function
df <- dplyr::tibble(
  xValues = c(
    0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5,
    0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2,
    3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
  ),
  yValues = c(
    0,
    0.990956723690033, 0.981773018836975, 0.972471475601196, 0.963047087192535,
    0.953498184680939, 0, 0.990953505039215, 0.981729507446289, 0.97233647108078,
    0.962786376476288, 0.953093528747559, 0, 0.990955889225006, 0.981753170490265,
    0.972399413585663, 0.962896287441254, 0.953253626823425, 0, 0.990950107574463,
    0.981710314750671, 0.972296476364136, 0.962724387645721, 0.953009009361267,
    0, 0.261394888162613, 0.266657412052155, 0.27151620388031, 0.275971591472626,
    0.280027687549591, 0, 0.26139160990715, 0.266613900661469, 0.271381109952927,
    0.275710910558701, 0.279623001813889, 0, 0.261393994092941, 0.266637593507767,
    0.271443992853165, 0.275820910930634, 0.279783099889755, 0, 0.261388212442398,
    0.266594797372818, 0.27134120464325, 0.275649011135101, 0.279538512229919
  ),
  group = c(rep("Stevens 2012 solid total", 24), rep("Stevens 2012 solid distal", 24)),
  name = group
)

# raw data
df

# aggregated data
ospsuite:::.extractAggregatedSimulatedData(df)


Open-Systems-Pharmacology/OSPSuite-R documentation built on April 28, 2024, 2:24 a.m.