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

generateAggregatedValues #59

Open Yuri05 opened 5 years ago

Yuri05 commented 5 years ago

For time profile plots it's often required to plot aggregated values (Min,Max, Median, Percentile XY, ...) (s. https://github.com/Open-Systems-Pharmacology/TLF-Library/issues/23)

If those values are not provided directly as a table by user: TLF-Lib should provide a helper function, which generates this table based on (individual) values.

The function could look like the following: aggregatedValues = generateAggregatedValues(individualValues, TC, GCs, VCs, Aggregations) with:

Example: individualValues looks like following:

Time IndividualID Population Gender Organ Compartment Simulated Observed Error
0 1 Asian M Venous Blood Plasma 2    
1 1 Asian F Venous Blood Plasma 3 2 0,1
2 1 Asian M Venous Blood Plasma 12 10 0,2
0 2 Asian F Venous Blood Plasma 9    
1 2 Asian M Venous Blood Plasma 3,1    
2 2 Asian M Venous Blood Plasma 3,3    
0 1 Asian M Brain Plasma 2    
1 1 Asian F Brain Plasma 3    
2 1 Asian M Brain Plasma 12    
0 2 Asian F Brain Plasma 9    
1 2 Asian M Brain Plasma 3,1 3 0,1
2 2 Asian M Brain Plasma 3,3 4 0,2

Inputs:

Then generateAggregatedValues(individualValues, TC, GCs, VCs, Aggregations) would produce the input below:

Time Organ Compartment Simulated Min Simulated Max
0 Venous Blood Plasma 2 0
1 Venous Blood Plasma 3 3,1
2 Venous Blood Plasma 3,3 12
0 Brain Plasma 2 0
1 Brain Plasma 3 3,1
2 Brain Plasma 3,3 12

Possible value for Aggregations:

abdullahhamadeh commented 5 years ago

Just curious why the 37th and 63th percentiles? Not the 33rd and 67th (third and two thirds)?

Yuri05 commented 5 years ago

@KatrinCoboeken @ju-rgen @incei @sfrechen FYI