| pdfOQ | R Documentation |
Generate a self-contained PDF report that documents whether the NonCompart noncompartmental analysis engine (as used through ncar) reproduces pre-specified reference results on the user's own machine, within a pre-specified relative tolerance. It is intended as Operational Qualification (OQ) evidence, in the spirit of the WinNonlin computational-engine verification. The report uses only base R, NonCompart, and the package's own pdf helpers, so it requires no LaTeX, pandoc, or other external tools.
pdfOQ(fileName = "ncar-OQ-Report.pdf", cases = NULL, tol = 0.001,
refDir = system.file("OQ", package = "ncar"), performedBy = "",
paper = "auto", sigField = FALSE)
fileName |
file name to save the PDF report |
cases |
a list of OQ case definitions. If |
tol |
acceptance tolerance: a parameter passes when the symmetric relative
difference |
refDir |
directory holding the reference csv files. Defaults to the
|
performedBy |
name of the person performing the qualification, printed in the report header. Defaults to the login name. |
paper |
paper size: |
sigField |
if |
For each case the function runs tblNCA on the (frozen) input data,
maps the CDISC PPTESTCD result columns to WinNonlin parameter names using the
internal RptCfg table, matches comparable parameters to the reference table
(robust to % vs . naming), and compares every parameter for every
subject. A case passes only when all of its comparisons pass.
Most bundled reference values are WinNonlin 6.4 NCA outputs. These establish concordance with the de-facto reference implementation (Tier B); they are not, by themselves, an independent verification.
Since 0.7.1 the set also contains independent (Tier A) anchors: three cases run a
synthetic fixture whose terminal phase is exactly mono-exponential, so lambda z, the
half-life and Clast_pred are known in closed form and the AUCs reduce to a
hand-summable trapezoid. The fixture carries a lag-phase zero, an embedded
below-the-limit-of-quantification sample inside the lambda z window and trailing BLQ.
A further three cases run the reporting layer itself and require every printed
parameter to equal the tblNCA value at the printed
precision, so a report can no longer disagree with the analysis table it summarises.
Since 0.7.2 three cases qualify the steady-state path (SS = TRUE with
tau, NonCompart 0.8.4): two Tier A cases on a single dosing interval whose
concentrations are small integers, so that AUCTAU is the hand-summable trapezoid 66,
CAVG is 66/12 and CL/F is the dose over 66, once with tau in hours and once with the
same tau in days; and one report-versus-table case that requires the printed
AUCTAU, CAVG, CLFO and VZFO to equal the table values.
Invisibly returns a list with elements fileName, qualified
(logical), tol, nCases, nFailCases, and results
(a per-case list with status, comparison counts, maximum relative difference,
and any failed comparisons). A PDF file is written to fileName.
Kyun-Seop Bae <k@acr.kr>
pdfIQ, pdfNCA, tblNCA
#pdfOQ()
#res <- pdfOQ(fileName = "MyEngine-OQ.pdf", performedBy = "Jane Doe")
#res$qualified
#res$results[[1]]$maxRD
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.