View source: R/calc_PK_ratios_mult.R
calc_PK_ratios_mult | R Documentation |
calc_PK_ratios_mult
matches PK data from pairs of simulator output
Excel files and calculates the mean and confidence intervals of the ratios of
the requested PK parameters. For detailed instructions and examples, please
see the SharePoint file "Simcyp PBPKConsult R Files - Simcyp PBPKConsult R
Files/SimcypConsultancy function examples and instructions/Calculating PK
ratios from separate simulations/Calculating-PK-ratios.docx". (Sorry, we are
unable to include a link to it here.)
calc_PK_ratios_mult(
PKparameters = NA,
compoundToExtract = NA,
tissue = NA,
sheet_PKparameters = NA,
existing_exp_details = NA,
paired = TRUE,
match_subjects_by = "individual and trial",
distribution_type = "t",
mean_type = "geometric",
include_num_denom_columns = TRUE,
conf_int = 0.9,
includeConfInt = TRUE,
includeCV = TRUE,
include_dose_num = NA,
concatVariability = TRUE,
variability_format = "to",
prettify_columns = TRUE,
prettify_compound_names = TRUE,
rounding = NA,
checkDataSource = TRUE,
extract_forest_data = FALSE,
save_table = NA,
name_clinical_study = NA,
shading_column,
highlight_gmr_colors = NA,
single_table = TRUE,
page_orientation = "landscape",
fontsize = 11,
sim_data_file_pairs = "deprecated"
)
PKparameters |
the PK parameters to include. There are two main options
for this: 1) supply a file to read or a data.frame (R speak for "a table")
that lists which simulation files, compounds, tissues, and PK you want or
2) supply a character vector of which PK parameters you want and then also
specify what you need in terms of which tissue, which compound, which
simulation files, and which tab to get the data from with the arguments
Parameters that don't make sense for your scenario – such as asking for
|
compoundToExtract |
For which compound do you want to extract PK data? Options are:
If you have want one compound for the numerator PK and a
different one for the denominator PK, that must be specified in a
data.frame or a csv file that you supply to the argument
|
tissue |
For which tissue would you like the PK parameters to be pulled? Options are
If you want one
tissue for the numerator PK and a different one for the denominator PK,
that must be specified in a data.frame or a csv file that you supply to the
argument |
sheet_PKparameters |
If you have a user-defined AUC interval and you
want the PK parameters for to be pulled from that specific tab in the
Simulator output Excel files, list that tab here. If you want standard
first-dose or last-dose PK parameters, leave this as the default NA; we
know where to find those. If you want one tab for the numerator simulation
and a different tab for the denominator simulation, that must be specified
in a data.frame or a csv file that you supply to the argument
|
existing_exp_details |
If you have already run
|
paired |
TRUE (default) or FALSE for whether the study design is paired, as in, the subjects are identical between the two simulations. THIS IS AN IMPORTANT DISTINCTION AND WILL AFFECT HOW THE CALCULATIONS ARE PERFORMED! An example of a paired study would be a DDI study where each subject has a measurement without the perpetrator of interest and then has a second measurement with the perpetrator. The comparison is for repeated measurements of the same subject. An example of an unpaired study design would be comparing healthy volunteers to subjects with hepatic impairment because those are measurements on different subjects. For paired study designs, the order of operations is to calculate each subject's mean ratio and then to calculate the mean of those ratios. For unpaired study designs, the order of operations is to calculate the mean for the numerator simulation and then divide it by the mean for the denominator simulation. Would this be clearer if you could see the mathematical equations? We agree but can't easily include equations in the help file. However, if you run this and save the output to a Word file, the equations will be included in the output. |
match_subjects_by |
For a paired study design, how would you like to match your subjects? Options are "individual and trial" (default), which matches by both the simulated individual ID number AND by the trial number, or "individual only", which matches only by the individual ID number. This will be ignored for unpaired study designs. Why are we even bothering with this, you ask? Just to be totally safe, we normally match simulated subjects by both the individual subject ID and by the trial number. We thought that this would always work and would be the safest option, but we discovered that, for some scenarios where you might expect the individuals to be exactly the same between two simulations, they actually were randomly assigned to different trials. Mismatched subjects would lead to inaccurate calculations, so we want to avoid that. If you use the default setting of "individual and trial" but the trials are NOT the same between simulations, you'll get a warning and no results, which we think is vastly superior to getting incorrect results. |
distribution_type |
use a "t" distribution (default) or a "Z" distribution. Note: The Simcyp Simulator calculates geometric confidence intervals with a t distribution. |
mean_type |
What kind of means and confidence intervals do you want listed in the output table? Options are "arithmetic" or "geometric" (default). |
include_num_denom_columns |
TRUE (default) or FALSE for whether to
include columns in the output table for the numerator data alone and
columns for the denominator alone. For example, if you wanted to calculate
the dose 1 AUC ratio for cancer patients compared to healthy volunteers,
settting |
conf_int |
confidence interval to use; default is 90% |
includeConfInt |
TRUE (default) or FALSE for whether to include whatever confidence intervals were included in the simulator output file. Note that the confidence intervals are geometric since that's what the simulator outputs (see an AUC tab and the summary statistics; these values are the ones for, e.g., "90% confidence interval around the geometric mean(lower limit)"). |
includeCV |
TRUE (default) or FALSE for whether to include rows for CV in the table |
include_dose_num |
NA (default), TRUE, or FALSE on whether to include the dose number when listing the PK parameter. By default, the parameter will be labeled, e.g., "Dose 1 Cmax ratio" or "Last dose AUCtau ratio", if you have PK data for both the first dose and the last dose. Also by default, if you have data only for the first dose or only for the last dose, the dose number will be omitted and it will be labeled, e.g., "AUCtau ratio" or "Cmax ratio". Set this to TRUE or FALSE as desired to override the default behavior and get exactly what you want. |
concatVariability |
TRUE (default) or FALSE for whether to concatenate the variability. If "TRUE", the output will be formatted into a single row and listed as the lower confidence interval or percentile to the upper CI or percentile, e.g., "2400 to 2700". Please note that the current SimcypConsultancy template lists one row for each of the upper and lower values, so this should be set to FALSE for official reports. |
variability_format |
formatting used to indicate the variability When the variability is concatenated. Options are "to" (default) to get output like "X to Y", "hyphen" to get output like "X - Y", "brackets" to get output like "[X, Y]", or "parentheses" for the eponymous symbol if you're an American and a bracket if you're British, e.g., "(X, Y)". (Sorry for the ambiguity; this was written by an American who didn't originally realize that there was another name for parentheses.) |
prettify_columns |
TRUE (default) or FALSE for whether to make easily
human-readable column names. TRUE makes pretty column names such as "AUCinf
(h*ng/mL)" whereas FALSE leaves the column with the R-friendly name from
|
prettify_compound_names |
TRUE (default) or FALSE on whether to make
compound names prettier in the prettified column titles and in any Word
output files. This was designed for simulations where the substrate and any
metabolites, perpetrators, or perpetrator metabolites are among the
standard
options for the simulator, and leaving |
rounding |
option for what rounding to perform, if any. Options are:
|
checkDataSource |
TRUE (default) or FALSE for whether to include in the output a data.frame that lists exactly where the data were pulled from the simulator output file. Useful for QCing. |
extract_forest_data |
TRUE or FALSE (default) to get forest-plot data at
the same time. If set to TRUE, this will return a list that includes data
formatted for use with the function |
save_table |
optionally save the output table and, if requested, the QC
info, by supplying a file name in quotes here, e.g., "My nicely formatted
table.docx" or "My table.csv", depending on whether you'd prefer to have
the main PK table saved as a Word or csv file. Do not include any slashes,
dollar signs, or periods in the file name. If you supply only the file
extension, e.g., |
name_clinical_study |
optionally specify the name(s) of the clinical
study or studies for any observed data. This only affects the caption of
the graph. For example, specifying |
shading_column |
If you would like to alternate the shading of the rows in the output table, supply here the unquoted name of the column to check for when to change the shading; every time that column's value changes, the shading will alternate between white and light gray. By default, we will alternate the shading based on the simulation file name. Setting this argument can be a little bit tricky because we'll be looking for a column that's present in the output from this function, something you might not know until you run it. If you specify something and the shading doesn't show up as expected, double check what the final output column names are and make sure you're using one of those. |
highlight_gmr_colors |
optionally specify a set of colors to use for highlighting geometric mean ratios for DDIs. Options are "yellow to red", "green to red" or a vector of 4 colors of your choosing. If left as NA, no highlighting for GMR level will be done. |
single_table |
TRUE (default) or FALSE for whether to save all the PK data in a single table or break the data up by tissue, compound ID, and file into multiple tables. This only applies to the Word output. |
page_orientation |
set the page orientation for the Word file output to "portrait" or "landscape" (default) |
fontsize |
the numeric font size for Word output. Default is 11 point. This only applies when you save the table as a Word file. |
sim_data_file_pairs |
DEPRECATED. This argument was used in the past to
specify which pairs of files to compare, but we are changing the way we're
asking you to tell us that. Now, we'd like you to give us this information
with the argument |
A list or a data.frame of PK data that optionally includes where the data came from and data to use for making forest plots
# No examples yet.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.