Skip to content

Commit

Permalink
Merge pull request #326 from billdenney/documentation_changes
Browse files Browse the repository at this point in the history
Documentation changes
  • Loading branch information
billdenney authored Oct 24, 2024
2 parents c4e7d68 + 8e377e9 commit 8feae33
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 23 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ The primary and secondary goals of the PKNCA package are to 1) only
give correct answers to the specific questions being asked and 2)
automate as much as possible to simplify the task of the analyst. When
automation would leave ambiguity or make a choice that the analyst may
have an alternate preference for, it is either not used or is possible
to override.
have an alternate preference for, it is either not used, is possible
to override or raises an error message.

Note that backward compatibility will not be guaranteed until version
1.0. Argument and function changes will continue until then. These
will be especially noticeable around the inclusion of IV NCA parameters
and additional specifications of the dosing including dose amount and
route.
will be especially noticeable around the inclusion of IV NCA parameters and additional specifications of the drug, which include dose amount and route of administration.

# Citation

Expand Down Expand Up @@ -78,9 +76,7 @@ To install the development version from GitHub, type the following commands:
# Summarize the results
summary(o_results)

More help is available in the function help files, and be sure to look
at the PKNCA.options function for many choices to make PKNCA conform
to your company's business rules for calculations and summarization.
More help is available in the function help files. Be sure to look at the PKNCA.options function for choices on making PKNCA conform to your company’s business rules on calculation and summarization.

# Feature requests

Expand Down
26 changes: 13 additions & 13 deletions vignettes/v01-introduction-and-usage.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ library(PKNCA)
```

PKNCA provides functions to complete noncompartmental analysis (NCA)
for pharmacokinetic (PK) data. Its intent is to provide a complete
R-based solution enabling data provenance for NCA including tracking
data cleaning, enabling calculations, exporting results, and
reporting. The library is designed to give a reasonable answer
without user intervention (load, calculate, and summarize), but it
allows the user to override the automatic selections at any point.
for pharmacokinetic (PK) data. Its intent is to provide a complete
R-based solution-enabling data provenance for NCA. This will include
the tracking of data cleaning, enabling of calculations, exporting
of results, and general reporting. The library is designed to give
a reasonable answer without user intervention (load, calculate, and summarize),
but it allows the user to override the automatic selections at any point.

The library design is modular to allow expansion based on needs
unforseen by the authors including new NCA parameters, novel data
Expand All @@ -30,8 +30,7 @@ library will be discussed in a separate vignette.

# Quick Start

The simplest analysis requires concentration and dosing data, then
five function calls can provide summarized results. (Please note that this and the other examples in this document are intended to show the typical workflow, but they are not intended to run directly. For an example to run directly, please see [the theophylline example](v02-example-theophylline.html).)
The simplest analysis requires concentration and dosing data at a minimum. Given this, it then takes five function calls to provide summarized results. (Please note that this and the other examples in this document are intended to show the typical workflow, but they are not intended to run directly. For an example to run directly, please see [the theophylline example](v02-example-theophylline.html).)

```{r setup_data}
library(PKNCA)
Expand Down Expand Up @@ -263,10 +262,11 @@ intervals <-
)
```

Intervals like the above is sufficient for designs with a single type of
treatment-- like single doses. For more complex treatments in a single
analysis, like the combination of single and multiple doses, include a treatment
column matching the treatment column name from the concentration data set. See
Intervals like the one above are sufficient for designs with a
single type of treatment– such as single doses. For more
complex treatments in a single analysis, like the combination of
single and multiple doses, include a treatment column matching
the treatment column name from the concentration data set. See
the [Manual Interval Specification](#manual-interval-specification) section
below for more details.

Expand All @@ -285,7 +285,7 @@ for the half-life or AUC~inf~ calculations.
A few functions look at data outside of a single interval, but these functions
do not look at data outside of a single group, and these functions are typically
used during preparation for NCA calculations not for the calculations
themselves. Functions that look a group as a whole include
themselves. Functions that look at a group as a whole include
`choose.auc.intervals`, `find.tau`, and `pk.tss`.

## Automatic Interval Determination
Expand Down
4 changes: 2 additions & 2 deletions vignettes/v05-auc-calculation-with-PKNCA.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ kable(as.data.frame(results_obj))

# AUC to the Last Value Above the Limit of Quantification (AUC~last~)

AUC~0-last~ calculates the AUC from time 0 to the last value above the limit of quantification, `tlast` (within PKNCA, this is the last value above 0). In the figure below, AUC~0-last~ integrate the shaded region. Integration after `tlast` is 0.
AUC~0-last~ calculates the AUC from time 0 to the last value above the limit of quantification, `tlast` (within PKNCA, this is the last value above 0). In the figure below, AUC~0-last~ integrates the shaded region. Integration after `tlast` is 0.

```{r auclast}
tlast <- pk.calc.tlast(conc=my_conc$conc,
Expand Down Expand Up @@ -120,7 +120,7 @@ ggplot(my_conc,

AUC~0-$\infty$~ is commonly used for single-dose data. It calculates the AUC~0-last~ and then extrapolates to $\infty$ using the estimated half-life. Two starting points are used to estimate from `tlast` to $\infty$, the observed or half-life predicted concentration at `tlast` (`clast.obs` and `clast.pred`).

The two figures below illustrate the integration with AUC~0-$\infty$,obs~ and AUC~0-$\infty$,pred$. The difference between the tow figures is most evident at time=8 where there is a discontinuity in integration at `tlast` due to using `clast.pred` after that point and `clast.obs` before that point. (To illustrate the integration differences, BLQ indicator shapes have been removed. BLQ is handled identically to previous figures.)
The two figures below illustrate the integration with AUC~0-$\infty$,obs~ and AUC~0-$\infty$,pred$. The difference between the two figures is most evident at time=8 where there is a discontinuity in integration at `tlast` due to using `clast.pred` after that point and `clast.obs` before that point. (To illustrate the integration differences, BLQ indicator shapes have been removed. BLQ is handled identically to previous figures.)

```{r aucinf, fig.width=6}
# Add one row to illustrate extrapolation beyond observed data
Expand Down

0 comments on commit 8feae33

Please sign in to comment.