Open-Systems-Pharmacology / TLF-Library

TLF Library implementation in R
https://www.open-systems-pharmacology.org/TLF-Library/
Other
9 stars 6 forks source link

Figures for reporting engine: qqplots #17

Open KatrinCoboeken opened 5 years ago

KatrinCoboeken commented 5 years ago

Figure: quantile-quantile plot

The purpose of the quantile-quantile plot is to determine whether the residuals are drawn from a normal distribution.

Residuals are calculated as linear or logarithmic difference of observed - predicted

Arguments:

Data

· Data.frame/data.table with following columns

o predicted (double) value of the predicted output to show in the unit of display, so no unit conversion is needed

o observed (double) value of the predicted output to show in the unit of display, so no unit conversion is needed

o Group (ordered factor) (character)

it is used to group individual results,

it is also used for legend (e.g. “Pediatric population”,”Adult Population”)

order of factor is used for legend order

· simulationResult.Metadata metada of Simulation Result

List with following entries:

o Value_unit: character

FigureConfiguration:

· value_label: character (e.g. ‘plasma concentrations’)

· scaleToCalculateDifference: character (default ‘lin’)

· colorscale_groups (default NULL, then take R defaults) defines colors for different groups

· shape_vector (default NULL, then take default) defines shape of residuals per identifier

Return:

List with entries

· Figure: Figure object

Details:

Calcualtion of residuals

If scaleToCalculateDifference = ‘lin’

residuals = observed – prediction

If scaleToCalculateDifference = ‘log’

residuals = log(observed) – log(prediction)

Plotting of simulated results

· plot quantiles of residuals vs quantiles of a normal distribution

· Plot reference line

· Set color by group

· Set shape by group

Legend should contain

· group name

Xlabel and Ylabel

· according to Xlabel and Ylabel issue #27 Figure: plot time profile

· Ylabel: ‘perctentiles residuals of ’ +

‘(observed – predicted)’ or ‘(log(observed) –log( predicted))’

ju-rgen commented 5 years ago

Example grafik