diff --git a/main/404.html b/main/404.html
index aedb325..b126520 100644
--- a/main/404.html
+++ b/main/404.html
@@ -39,6 +39,12 @@
Changelog
+
+ Versions
+
diff --git a/main/authors.html b/main/authors.html
index 9f4da04..92c9c52 100644
--- a/main/authors.html
+++ b/main/authors.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/index.html b/main/index.html
index 22d9b4b..58ceead 100644
--- a/main/index.html
+++ b/main/index.html
@@ -41,6 +41,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/applyQtl.html b/main/reference/applyQtl.html
index a4fc088..bc47ba9 100644
--- a/main/reference/applyQtl.html
+++ b/main/reference/applyQtl.html
@@ -28,6 +28,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/berrySubject.html b/main/reference/berrySubject.html
index 67f291d..5eaf973 100644
--- a/main/reference/berrySubject.html
+++ b/main/reference/berrySubject.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/berrySummary.html b/main/reference/berrySummary.html
index a00a3eb..ca7c670 100644
--- a/main/reference/berrySummary.html
+++ b/main/reference/berrySummary.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/cavalryDeaths.html b/main/reference/cavalryDeaths.html
index 3eef45f..9c69786 100644
--- a/main/reference/cavalryDeaths.html
+++ b/main/reference/cavalryDeaths.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/createObservedMinusExpectedPlot.html b/main/reference/createObservedMinusExpectedPlot.html
index 640fa65..cfb48b2 100644
--- a/main/reference/createObservedMinusExpectedPlot.html
+++ b/main/reference/createObservedMinusExpectedPlot.html
@@ -28,6 +28,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/createObservedMinusExpectedTable.html b/main/reference/createObservedMinusExpectedTable.html
index 54a58c8..c8a336e 100644
--- a/main/reference/createObservedMinusExpectedTable.html
+++ b/main/reference/createObservedMinusExpectedTable.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/createObservedOverExpectedPlot.html b/main/reference/createObservedOverExpectedPlot.html
index e20b855..325c2d9 100644
--- a/main/reference/createObservedOverExpectedPlot.html
+++ b/main/reference/createObservedOverExpectedPlot.html
@@ -26,6 +26,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/createObservedOverExpectedTable.html b/main/reference/createObservedOverExpectedTable.html
index 370f973..f21024f 100644
--- a/main/reference/createObservedOverExpectedTable.html
+++ b/main/reference/createObservedOverExpectedTable.html
@@ -30,6 +30,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/createQtlBubblePlot.html b/main/reference/createQtlBubblePlot.html
index dd20026..42ef127 100644
--- a/main/reference/createQtlBubblePlot.html
+++ b/main/reference/createQtlBubblePlot.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/createQtlPlot.html b/main/reference/createQtlPlot.html
index 88390ce..382de93 100644
--- a/main/reference/createQtlPlot.html
+++ b/main/reference/createQtlPlot.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-assertColumnDoesNotExist.html b/main/reference/dot-assertColumnDoesNotExist.html
index dd8bf1e..bcc6246 100644
--- a/main/reference/dot-assertColumnDoesNotExist.html
+++ b/main/reference/dot-assertColumnDoesNotExist.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-assertColumnExists.html b/main/reference/dot-assertColumnExists.html
index ae741eb..4613d6a 100644
--- a/main/reference/dot-assertColumnExists.html
+++ b/main/reference/dot-assertColumnExists.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-autorunJagsAndCaptureOutput.html b/main/reference/dot-autorunJagsAndCaptureOutput.html
index f83d1ca..4571ef3 100644
--- a/main/reference/dot-autorunJagsAndCaptureOutput.html
+++ b/main/reference/dot-autorunJagsAndCaptureOutput.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-columnExists.html b/main/reference/dot-columnExists.html
index 5ea9863..9c3b800 100644
--- a/main/reference/dot-columnExists.html
+++ b/main/reference/dot-columnExists.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-createBinomialInit.html b/main/reference/dot-createBinomialInit.html
index fa1cdb3..eebf26e 100644
--- a/main/reference/dot-createBinomialInit.html
+++ b/main/reference/dot-createBinomialInit.html
@@ -26,6 +26,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-createPoissonInit.html b/main/reference/dot-createPoissonInit.html
index c04f157..f342ec4 100644
--- a/main/reference/dot-createPoissonInit.html
+++ b/main/reference/dot-createPoissonInit.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/dot-ensureLimitsAreNamed.html b/main/reference/dot-ensureLimitsAreNamed.html
index a2ccd2b..f21a8fe 100644
--- a/main/reference/dot-ensureLimitsAreNamed.html
+++ b/main/reference/dot-ensureLimitsAreNamed.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/evaluateCustomQTL.html b/main/reference/evaluateCustomQTL.html
index f3b4d23..f33f6bc 100644
--- a/main/reference/evaluateCustomQTL.html
+++ b/main/reference/evaluateCustomQTL.html
@@ -34,6 +34,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/evaluatePointEstimateQTL.html b/main/reference/evaluatePointEstimateQTL.html
index 3513746..3813bce 100644
--- a/main/reference/evaluatePointEstimateQTL.html
+++ b/main/reference/evaluatePointEstimateQTL.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/evaluateProbabilityInRangeQTL.html b/main/reference/evaluateProbabilityInRangeQTL.html
index c03aa14..fb85416 100644
--- a/main/reference/evaluateProbabilityInRangeQTL.html
+++ b/main/reference/evaluateProbabilityInRangeQTL.html
@@ -34,6 +34,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/evaluateSiteMetricQTL.html b/main/reference/evaluateSiteMetricQTL.html
index 8f35cc3..7ec9d73 100644
--- a/main/reference/evaluateSiteMetricQTL.html
+++ b/main/reference/evaluateSiteMetricQTL.html
@@ -28,6 +28,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/fitBayesBinomialModel.html b/main/reference/fitBayesBinomialModel.html
index ed5c187..b1eccae 100644
--- a/main/reference/fitBayesBinomialModel.html
+++ b/main/reference/fitBayesBinomialModel.html
@@ -28,6 +28,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/fitBayesPoissonModel.html b/main/reference/fitBayesPoissonModel.html
index d835bd2..5c32d05 100644
--- a/main/reference/fitBayesPoissonModel.html
+++ b/main/reference/fitBayesPoissonModel.html
@@ -26,6 +26,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/getModelString.html b/main/reference/getModelString.html
index ee791c6..74a376e 100644
--- a/main/reference/getModelString.html
+++ b/main/reference/getModelString.html
@@ -26,6 +26,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/index.html b/main/reference/index.html
index a082179..5ba6b99 100644
--- a/main/reference/index.html
+++ b/main/reference/index.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/pipe.html b/main/reference/pipe.html
index d939f3d..4af1e95 100644
--- a/main/reference/pipe.html
+++ b/main/reference/pipe.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/shadeRange.html b/main/reference/shadeRange.html
index a2e5487..5f77816 100644
--- a/main/reference/shadeRange.html
+++ b/main/reference/shadeRange.html
@@ -26,6 +26,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/siteRates.html b/main/reference/siteRates.html
index b03b24b..cc25fc0 100644
--- a/main/reference/siteRates.html
+++ b/main/reference/siteRates.html
@@ -24,6 +24,12 @@
Changelog
+
+ Versions
+
diff --git a/main/reference/vaLung.html b/main/reference/vaLung.html
index 6bfd933..4cd7b8a 100644
--- a/main/reference/vaLung.html
+++ b/main/reference/vaLung.html
@@ -72,6 +72,12 @@
Changelog
+
+ Versions
+
diff --git a/main/search.json b/main/search.json
index 6d058e0..e1d7b6c 100644
--- a/main/search.json
+++ b/main/search.json
@@ -1 +1 @@
-[{"path":"https://openpharma.github.io/rbqmR/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"John Kirkpatrick. Author, maintainer.","code":""},{"path":"https://openpharma.github.io/rbqmR/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kirkpatrick J (2024). rbqmR: Risk-Based Quality Management R. R package version 0.0.0.9002.","code":"@Manual{, title = {rbqmR: Risk-Based Quality Management in R}, author = {John Kirkpatrick}, year = {2024}, note = {R package version 0.0.0.9002}, }"},{"path":[]},{"path":"https://openpharma.github.io/rbqmR/index.html","id":"introduction","dir":"","previous_headings":"","what":"Introduction","title":"Risk-Based Quality Management in R","text":"purpose rbqmR package provide repository r-based tools implementation risk-based quality management. Tools currently exist Dynamic Quality Tolerance Limits (QTLs) using Bayesian Hierarchical Models (ongoing) Observed-Minus-Expected methodology Observed/Expected methodology (ongoing) package work--progress. ’s primary focus dynamic QTLs. methodologies included completeness.","code":""},{"path":"https://openpharma.github.io/rbqmR/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Risk-Based Quality Management in R","text":"can install development version rbqmR GitHub :","code":"# install.packages(\"devtools\") devtools::install_github(\"openpharma/rbqmR\")"},{"path":"https://openpharma.github.io/rbqmR/index.html","id":"dynamic-qtls","dir":"","previous_headings":"","what":"Dynamic QTLs","title":"Risk-Based Quality Management in R","text":"use example 2.7 Berry et al (Berry SM 2011), described pages 52 63, modifying context rather meta analysis several different trials, consider data represent performance different sites within single trial. exact metric measured immaterial, though remains summary binomial outcome. central tenet QTL methodology implemented rbqmR current trial behave similar fashion “similar” historical control trial, rather sites within current trial behave similar way. justification assumption trial’s inclusion/exclusion criteria designed minimise heterogeneity amongst study population (save induced differences treatment comparative trials). fit Bayesian Hierarchical Model described Berry et al … … use quantiles posterior distribution probability event define QTLs metric. can done isolation (trial acts control) reference historical data obtained similar previous studies.","code":"data(berrySummary) berrySummary %>% kable(digits = c(0, 0, 0, 2)) fitted <- berrySummary %>% fitBayesBinomialModel(n = Subjects, r = Events) #> Loading required namespace: rjags #> INFO [2024-06-17 07:55:30] Status of model fitting: OK fitted #> $tab #> # A tibble: 20,000 × 4 #> p a b q #> #> 1 0.814 6.46 2.41 76 #> 2 0.854 7.28 2.79 84 #> 3 0.753 6.34 3.09 62 #> 4 0.691 8.96 3.68 49 #> 5 0.690 9.58 3.74 48 #> 6 0.706 8.13 2.52 52 #> 7 0.583 8.45 3.63 27 #> 8 0.624 6.44 3.67 34 #> 9 0.664 3.95 3.65 43 #> 10 0.608 6.91 3.48 31 #> # ℹ 19,990 more rows #> #> $results #> #> JAGS model summary statistics from 20000 samples (chains = 2; adapt+burnin = 5000): #> #> Lower95 Median Upper95 Mean SD Mode MCerr MC%ofSD SSeff #> p[10] 0.36562 0.6991 0.99996 0.68282 0.17257 -- 0.0013713 0.8 15837 #> a 2.2683 5.9563 9.9997 5.9373 2.2751 -- 0.056178 2.5 1640 #> b 0.62627 2.6183 5.1708 2.7753 1.2508 -- 0.031487 2.5 1578 #> #> AC.10 psrf #> p[10] 0.0094542 1 #> a 0.21013 1.0011 #> b 0.22843 1.0003 #> #> Total time taken: 3.9 seconds #> #> #> $status #> [1] \"OK\""},{"path":"https://openpharma.github.io/rbqmR/index.html","id":"examples-of-qtl-evaluation-rules","dir":"","previous_headings":"Dynamic QTLs","what":"Examples of QTL evaluation rules","title":"Risk-Based Quality Management in R","text":"using Bayesian Hierarchical Model, probabilities associated credible intervals generally lower associated similar frequentist models. BHMs permit sources variation. , BHM permits variation response rates different sites, even considering overall event rate study. corresponding frequentist analysis assumes sites share common event rate, thus assuming inter-site variation.","code":""},{"path":"https://openpharma.github.io/rbqmR/index.html","id":"comparison-to-constant-values","dir":"","previous_headings":"Dynamic QTLs > Examples of QTL evaluation rules","what":"Comparison to constant value(s)","title":"Risk-Based Quality Management in R","text":"evaluatePointEstimateQTL allows comparison arbitrary scalar summary statistic (defaults mean) derived estimate posterior distribution, arbitrary number lower upper limits. example, code defines QTL based mean posterior distribution probability event. Call probability p̂. warning limits 0.5 0.8. action limits 0.4 0.9. evaluateXXXXQTL functions, return value evaluatePointEstimateQTL list. status element indicates whether QTL’s limits breached. qtl element gives calculated value QTL metric data element returns copy data.frame containing site level KRIs augmented column indicating , , various limits breached site. lower upper parameters optional (though least one must given) number limits, labels, arbitrary. one limit defined, can provided scalar, case labelled action. function QTL based specified stat parameter evaluatePointEstimateQTL can user-defined function. example, following code fragments define QTLs based median 10th centile posterior distribution p̂.","code":"berrySummary %>% evaluatePointEstimateQTL( posterior = fitted$tab, metric = p, observedMetric = ObservedResponse, lower = c(\"warn\" = 0.5, \"action\" = 0.4), upper = c(\"warn\" = 0.8, \"action\" = 0.9) ) #> $status #> [1] \"OK\" #> #> $qtl #> [1] 0.6828212 #> #> $data #> # A tibble: 9 × 5 #> Site Subjects Events ObservedResponse Status #> #> 1 1 20 20 1 action #> 2 2 10 4 0.4 warn #> 3 3 16 11 0.688 OK #> 4 4 19 10 0.526 OK #> 5 5 14 5 0.357 warn #> 6 6 46 36 0.783 OK #> 7 7 10 9 0.9 warn #> 8 8 9 7 0.778 OK #> 9 9 6 4 0.667 OK berrySummary %>% evaluatePointEstimateQTL( posterior = fitted$tab, metric = p, observedMetric = ObservedResponse, upper = c(\"mild\" = 0.6, \"moderate\" = 0.8, \"severe\" = 0.9) ) berrySummary %>% evaluatePointEstimateQTL( posterior = fitted$tab, metric = p, stat = median, observedMetric = ObservedResponse, upper = c(\"warn\" = 0.7, \"action\" = 0.9) ) #> $status #> [1] \"OK\" #> #> $qtl #> [1] 0.6991032 #> #> $data #> # A tibble: 9 × 5 #> Site Subjects Events ObservedResponse Status #> #> 1 1 20 20 1 action #> 2 2 10 4 0.4 OK #> 3 3 16 11 0.688 OK #> 4 4 19 10 0.526 OK #> 5 5 14 5 0.357 OK #> 6 6 46 36 0.783 warn #> 7 7 10 9 0.9 warn #> 8 8 9 7 0.778 warn #> 9 9 6 4 0.667 OK berrySummary %>% evaluatePointEstimateQTL( posterior = fitted$tab, metric = p, stat = function(x) quantile(x, probs = 0.1), observedMetric = ObservedResponse, upper = c(\"warn\" = 0.3, \"action\" = 0.8) ) #> $status #> [1] \"warn\" #> #> $qtl #> 10% #> 0.4495861 #> #> $data #> # A tibble: 9 × 5 #> Site Subjects Events ObservedResponse Status #> #> 1 1 20 20 1 action #> 2 2 10 4 0.4 warn #> 3 3 16 11 0.688 warn #> 4 4 19 10 0.526 warn #> 5 5 14 5 0.357 warn #> 6 6 46 36 0.783 warn #> 7 7 10 9 0.9 action #> 8 8 9 7 0.778 warn #> 9 9 6 4 0.667 warn"},{"path":"https://openpharma.github.io/rbqmR/index.html","id":"based-on-the-probability-that-the-derived-metric-is-in-a-given-range","dir":"","previous_headings":"Dynamic QTLs > Examples of QTL evaluation rules","what":"Based on the probability that the derived metric is in a given range","title":"Risk-Based Quality Management in R","text":"Suppose previous experience tells us event probability type study 0.50 0.75. define QTL require posterior event probability new participant range 0.5 0.75 inclusive least 60%, warning limit 80%. Individual sites flagged response rate either 40% 85%. , QTL breached, since probability study-level event rate range [0.5, 0.75] 0.46.","code":"qtlProbInRange <- berrySummary %>% evaluateProbabilityInRangeQTL( posterior = fitted$tab, metric = p, observedMetric = ObservedResponse, range = c(0.5, 0.75), probs = c(\"warn\" = 0.8, \"action\" = 0.6), lower = 0.4, upper = 0.85 ) qtlProbInRange #> $status #> [1] \"action\" #> #> $qtl #> [1] 0.46465 #> #> $data #> # A tibble: 9 × 5 #> Site Subjects Events ObservedResponse Status #> #> 1 1 20 20 1 action #> 2 2 10 4 0.4 OK #> 3 3 16 11 0.688 OK #> 4 4 19 10 0.526 OK #> 5 5 14 5 0.357 action #> 6 6 46 36 0.783 OK #> 7 7 10 9 0.9 action #> 8 8 9 7 0.778 OK #> 9 9 6 4 0.667 OK"},{"path":"https://openpharma.github.io/rbqmR/index.html","id":"using-an-arbitrary-criterion","dir":"","previous_headings":"Dynamic QTLs > Examples of QTL evaluation rules","what":"Using an arbitrary criterion","title":"Risk-Based Quality Management in R","text":"evaluatePointEstimateQTL, evaluateProbabilityInRangeQTL (evaluateSiteMetricQTL discussed ) wrappers around evaluateCustomQTL, can used evaluate arbitrary, user-defined QTL rule. evaluateCustomQTL takes following parameters: data: tibble containing site-level observed metrics posterior: tibble containing posterior distribution metric, usually obtained fit Bayes model function. f: function whose first two parameters data posterior, ordered names statusCol: column data defines status site. , Status. Uses tidy evaluation. ...: additional parameters passed f. Essentially, evaluateCustomQTL perform basic checks parameter values return value returned data %>% f(posterior, ...). , example, simplified version evaluatePointEstimateQTL compares p̂ 0.6 might ","code":"berrySummary %>% evaluateCustomQTL( posterior = fitted$tab, f = function(data, posterior) { rv <- list() rv$qtl <- posterior %>% summarise(qtl = mean(p)) %>% pull(qtl) rv$status <- ifelse(rv$qtl < 0.6, \"OK\", \"Breach\") rv$data <- data %>% mutate(Status = ifelse(ObservedResponse < 0.6, \"OK\", \"Breach\")) rv } ) #> $qtl #> [1] 0.6828212 #> #> $status #> [1] \"Breach\" #> #> $data #> # A tibble: 9 × 5 #> Site Subjects Events ObservedResponse Status #> #> 1 1 20 20 1 Breach #> 2 2 10 4 0.4 OK #> 3 3 16 11 0.688 Breach #> 4 4 19 10 0.526 OK #> 5 5 14 5 0.357 OK #> 6 6 46 36 0.783 Breach #> 7 7 10 9 0.9 Breach #> 8 8 9 7 0.778 Breach #> 9 9 6 4 0.667 Breach"},{"path":"https://openpharma.github.io/rbqmR/index.html","id":"without-historical-data","dir":"","previous_headings":"Dynamic QTLs","what":"Without historical data","title":"Risk-Based Quality Management in R","text":"Especially early development new compound, project teams often say idea values various metrics used define QTLs might . conventionally defined QTLs can problem: inappropriately chosen QTL might lead breach , reality, issue. Basing QTL centiles posterior distribution metric obtained QTL model just fitted, recalling purpose inclusion/exclusion criteria minimise heterogeneity, can avoid problem. evaluateSiteMetricQTL function calculates thresholds (example warning action limits) translating quantiles posterior distribution metric real-life scale metric measured. , use Berry data example. quantiles element return value contains mappings quantile posterior observed values metric. example, first row rvSiteMetrics$quantiles shows lower action limit 5th centile posterior, corresponds event probability 0.366. , data element list contains copy site metric dataset, augmented column (named Status default) allocates observed site-level metrics (KRIs) band defined thresholds lower upper. NB rvSiteMetrics$data contains incorrect values Status column. See issue #12. qtl element return value contains counts sites threshold name. Finally, status returned QTL \"OK\" default. However, evaluateSiteMetricQTL can passed function can apply arbitrary rule determine whether breach occurred. example , function’s argument qtl element evaluateSiteMetricQTL’s return value. example, given nine sites fictitious example calculated 90% posterior credible interval, ’s reasonable expect one site lie outside range. might say QTL breach occurred two sites lie outside credible interval:","code":"rvSiteMetrics <- berrySummary %>% evaluateSiteMetricQTL( posterior = fitted$tab, metric = p, observedMetric = ObservedResponse, lower = c(\"action\" = 0.05, \"warn\" = 0.2), upper = c(\"action\" = 0.95, \"warn\" = 0.8) ) rvSiteMetrics$quantiles #> # A tibble: 4 × 4 #> Threshold Status Quantile p #> #> 1 Lower action 0.05 0.366 #> 2 Lower warn 0.2 0.543 #> 3 Upper warn 0.8 0.838 #> 4 Upper action 0.95 0.933 rvSiteMetrics$data #> # A tibble: 9 × 5 #> Site Subjects Events ObservedResponse Status #> #> 1 1 20 20 1 warn #> 2 2 10 4 0.4 warn #> 3 3 16 11 0.688 OK #> 4 4 19 10 0.526 warn #> 5 5 14 5 0.357 action #> 6 6 46 36 0.783 OK #> 7 7 10 9 0.9 warn #> 8 8 9 7 0.778 OK #> 9 9 6 4 0.667 OK rvSiteMetrics$qtl #> # A tibble: 3 × 2 #> Status N #> #> 1 OK 4 #> 2 action 1 #> 3 warn 4 rvSiteMetrics$status #> [1] \"OK\" (berrySummary %>% evaluateSiteMetricQTL( posterior = fitted$tab, metric = p, observedMetric = ObservedResponse, lower = c(\"action\" = 0.5, \"warn\" = 0.6), upper = c(\"action\" = 0.9, \"warn\" = 0.8), statusFunc = function(d) { ifelse( d %>% dplyr::filter(Status == \"action\") %>% dplyr::pull(N) >= 2, \"action\", \"OK\" ) } ))$status #> [1] \"action\""},{"path":"https://openpharma.github.io/rbqmR/index.html","id":"representing-the-evaluation-of-a-qtl-graphically","dir":"","previous_headings":"","what":"Representing the evaluation of a QTL graphically","title":"Risk-Based Quality Management in R","text":"Take, example, QTL requires study level metric lie within given range, illustrated . site-level KRIs can added plot help focus attention intervention likely largest effect.","code":"fitted$tab %>% createQtlPlot( targetRange = list(\"lower\" = 0.5, \"upper\" = 0.75), observedMetric = fitted$tab %>% summarise(Mean = mean(p)) %>% pull(Mean) ) fitted$tab %>% createQtlPlot( targetRange = list(\"lower\" = 0.5, \"upper\" = 0.75), observedMetric = fitted$tab %>% summarise(Mean = mean(p)) %>% pull(Mean), actionLimits = list( list( \"lower\" = rvSiteMetrics$quantiles %>% filter(Threshold == \"Upper\", Status == \"action\") %>% pull(p), \"upper\" = NA, \"alpha\" = 0.3, \"colour\" = \"goldenrod1\" ), list( \"lower\" = NA, \"upper\" = rvSiteMetrics$quantiles %>% filter(Threshold == \"Lower\", Status == \"action\") %>% pull(p), \"alpha\" = 0.3, \"colour\" = \"goldenrod1\" ) ), siteData = berrySummary, siteSize = Subjects, siteMetric = ObservedResponse )"},{"path":"https://openpharma.github.io/rbqmR/index.html","id":"presenting-kris","dir":"","previous_headings":"","what":"Presenting KRIs","title":"Risk-Based Quality Management in R","text":"KRIs associated QTL can presented graphically. rmqmR includes createQtlBubblePlot function, presents KRIs (possibly multiple evaluations QTL) form bubble plot overlaid box--whisker plot. Site-level data may grouped arbitrary fashion, . Optionally, reference lines correspond QTL thresholds may added.","code":"berrySummary %>% add_column(Snapshot = \"End of study\") %>% add_column(Location = c(rep(\"EU\", 4), rep(\"US\", 5))) %>% createQtlBubblePlot( x = Snapshot, y = ObservedResponse, size = Subjects, group = Location, boxWidth = 0.1, limits = list( list( label = \"QTL (85%)\", colour = \"red\", type = \"dashed\", y = 0.85, x = 1.25, vjust = -1 ), list( label = \"Sec Lim (75%)\", colour = \"goldenrod\", type = \"dotted\", y = 0.75, x = 1.25, vjust = 1.25 ) ) ) #> Warning: The following aesthetics were dropped during statistical transformation: size #> ℹ This can happen when ggplot fails to infer the correct grouping structure in #> the data. #> ℹ Did you forget to specify a `group` aesthetic or to convert a numerical #> variable into a factor?"},{"path":"https://openpharma.github.io/rbqmR/index.html","id":"observed---expected-methodology","dir":"","previous_headings":"","what":"Observed - Expected Methodology","title":"Risk-Based Quality Management in R","text":"generate random data similar used (Gilbert 2020), setting seed reproducibility. order illustrate happens QTL breached, set probability participant reports event 0.13, even though QTL process assume event rate 0.10… … create observed-expected table … … plot corresponding graph. can see trial breached warning limit. first happen? First breach action warning limit Warning Limits","code":"set.seed(011327) randomData <- tibble( Subject = 1:400, Event = rbinom(400, 1, 0.13) ) omeTable <- randomData %>% createObservedMinusExpectedTable( timeVar = Subject, eventVar = Event, eventArray = 1, expectedRate = 0.1, maxTrialSize = 400 ) omeTable %>% createObservedMinusExpectedPlot() omeTable %>% filter(Status != \"OK\") %>% head(1) %>% select(-contains(\"Action\"), -SubjectIndex) %>% kable( col.names = c(\"Subject\", \"Event\", \"Cumulative Events\", \"O - E\", \"Status\", \"Lower\", \"Upper\"), caption = \"First breach of an action or warning limit\" ) %>% add_header_above(c(\" \" = 5, \"Warning Limits\" = 2))"},{"path":"https://openpharma.github.io/rbqmR/index.html","id":"observed--expected-methodology","dir":"","previous_headings":"","what":"Observed / Expected methodology","title":"Risk-Based Quality Management in R","text":"Katz et al (Katz D 1978) calculate confidence interval ratio two binomial random variables. use determine QTLs ratio observed expected proportions. variability associated ratio suggests methodology likely useful large studies low expected event rates. require historical trial data implement methodology. Suppose data 10,000 historical patients reported given event rate 1.4%. planning 1500 patient trial reason suppose event rate trial different seen past. trial executed, observed data can added table plot. TODO Need check interpretation parameters","code":"createObservedOverExpectedTable( nHistorical = 10000, historicalRate = 0.014, expectedRate = 0.014, nObservedRange = seq(50, 1500, 25) ) %>% createObservedOverExpectedPlot() observedData <- tibble( NObserved = c(250, 500, 750, 1000), ObservedRate = 100 * c(2, 9, 15, 16) / NObserved ) createObservedOverExpectedTable( nHistorical = 10000, historicalRate = 0.014, expectedRate = 0.014, nObservedRange = seq(50, 1500, 25), observedData = observedData, observedRate = ObservedRate ) %>% createObservedOverExpectedPlot(observedRate = ObservedRate)"},{"path":"https://openpharma.github.io/rbqmR/index.html","id":"beyond-transcelerate","dir":"","previous_headings":"","what":"Beyond TransCelerate","title":"Risk-Based Quality Management in R","text":"time writing (late 2022) TransCelerate Quality Tolerance Limit Framework (Transcelerate 2020) lists metrics exclusively binary nature. many potential metrics non-binary may provide insight conduct trial. example, number episodes rescue medication (opposed percentage number trial participants rescue medication) Time withdrawal consent (opposed percentage number trial participants withdrawal informed consent) well metrics can’t easily dichotomised Drug plasma levels Number (S)AEs reported per time unit drug exposure Time respond data queries Bayesian QTL framework implemented rbqmR can easily extended include data types.","code":""},{"path":"https://openpharma.github.io/rbqmR/index.html","id":"events-per-unit-time","dir":"","previous_headings":"","what":"Events per unit time","title":"Risk-Based Quality Management in R","text":"use data numbers Prussian cavalry officers kicked death horses (Bortkiewicz 1898) illustrate method. Regard different cavalry Corps “sites” regard number years data collected “exposure”. Although necessary , data Corps recorded amount time, Poisson model used rbqmR adjusts risk total exposure site. Fitting model straightforward.","code":"data(\"cavalryDeaths\") cavalryDeaths #> # A tibble: 280 × 3 #> Year Corps Deaths #> #> 1 1875 Guards 0 #> 2 1875 Corps 1 0 #> 3 1875 Corps 2 0 #> 4 1875 Corps 3 0 #> 5 1875 Corps 4 0 #> 6 1875 Corps 5 0 #> 7 1875 Corps 6 0 #> 8 1875 Corps 7 1 #> 9 1875 Corps 8 1 #> 10 1875 Corps 9 0 #> # ℹ 270 more rows cavalrySummary <- cavalryDeaths %>% group_by(Corps) %>% summarise( Deaths = sum(Deaths), TotalTime = n(), .groups = \"drop\" ) %>% mutate(DeathRate = Deaths / TotalTime) cavalrySummary #> # A tibble: 14 × 4 #> Corps Deaths TotalTime DeathRate #> #> 1 Guards 16 20 0.8 #> 2 Corps 1 16 20 0.8 #> 3 Corps 2 12 20 0.6 #> 4 Corps 3 12 20 0.6 #> 5 Corps 4 8 20 0.4 #> 6 Corps 5 11 20 0.55 #> 7 Corps 6 17 20 0.85 #> 8 Corps 7 12 20 0.6 #> 9 Corps 8 7 20 0.35 #> 10 Corps 9 13 20 0.65 #> 11 Corps 10 15 20 0.75 #> 12 Corps 11 25 20 1.25 #> 13 Corps 14 24 20 1.2 #> 14 Corps 15 8 20 0.4 getModelString(\"poisson\") #> model { #> for (i in 1:k) { #> #> events[i] ~ dpois(mu[i]) #> mu[i] <- lambda[i]*exposure[i] #> #> lambda[i] ~ dgamma(shape, 1/scale) #> } #> scale ~ dgamma(1, 1) #> shape ~ dgamma(1, 1) #> } poissonFit <- cavalrySummary %>% fitBayesPoissonModel(Deaths, TotalTime) #> INFO [2024-06-17 07:55:41] Status of model fitting: OK poissonFit$tab %>% createQtlPlot( metric = lambda, siteData = cavalrySummary, siteSize = TotalTime, siteMetric = DeathRate ) + labs(x = \"Deaths per year\")"},{"path":"https://openpharma.github.io/rbqmR/index.html","id":"environment","dir":"","previous_headings":"","what":"Environment","title":"Risk-Based Quality Management in R","text":"","code":"sessionInfo() #> R version 4.3.1 (2023-06-16) #> Platform: x86_64-pc-linux-gnu (64-bit) #> Running under: Ubuntu 22.04.3 LTS #> #> Matrix products: default #> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 #> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 #> #> locale: #> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C #> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 #> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 #> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C #> [9] LC_ADDRESS=C LC_TELEPHONE=C #> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C #> #> time zone: Etc/UTC #> tzcode source: system (glibc) #> #> attached base packages: #> [1] stats graphics grDevices utils datasets methods base #> #> other attached packages: #> [1] rbqmR_0.0.0.9002 testthat_3.2.0 lubridate_1.9.3 forcats_1.0.0 #> [5] stringr_1.5.0 dplyr_1.1.3 purrr_1.0.2 readr_2.1.4 #> [9] tidyr_1.3.0 tibble_3.2.1 ggplot2_3.4.3 tidyverse_2.0.0 #> [13] kableExtra_1.3.4 magrittr_2.0.3 #> #> loaded via a namespace (and not attached): #> [1] tidyselect_1.2.0 viridisLite_0.4.2 farver_2.1.1 #> [4] rjags_4-14 fastmap_1.1.1 promises_1.2.1 #> [7] digest_0.6.33 timechange_0.2.0 mime_0.12 #> [10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 #> [13] compiler_4.3.1 rlang_1.1.1 tools_4.3.1 #> [16] utf8_1.2.3 yaml_2.3.7 knitr_1.44 #> [19] lambda.r_1.2.4 labeling_0.4.3 prettyunits_1.2.0 #> [22] htmlwidgets_1.6.2 pkgbuild_1.4.2 xml2_1.3.5 #> [25] pkgload_1.3.3 miniUI_0.1.1.1 withr_2.5.1 #> [28] desc_1.4.2 grid_4.3.1 fansi_1.0.5 #> [31] urlchecker_1.0.1 profvis_0.3.8 toOrdinal_1.3-0.0 #> [34] xtable_1.8-4 colorspace_2.1-0 scales_1.2.1 #> [37] cli_3.6.1 rmarkdown_2.25 crayon_1.5.2 #> [40] generics_0.1.3 remotes_2.4.2.1 rstudioapi_0.15.0 #> [43] httr_1.4.7 tzdb_0.4.0 sessioninfo_1.2.2 #> [46] cachem_1.0.8 rvest_1.0.3 parallel_4.3.1 #> [49] formatR_1.14 vctrs_0.6.3 devtools_2.4.5 #> [52] webshot_0.5.5 callr_3.7.3 hms_1.1.3 #> [55] systemfonts_1.0.5 glue_1.6.2 ps_1.7.5 #> [58] stringi_1.7.12 gtable_0.3.4 futile.logger_1.4.3 #> [61] later_1.3.1 munsell_0.5.0 pillar_1.9.0 #> [64] brio_1.1.3 htmltools_0.5.6.1 R6_2.5.1 #> [67] rprojroot_2.0.3 evaluate_0.22 shiny_1.7.5 #> [70] lattice_0.21-9 highr_0.10 futile.options_1.0.1 #> [73] memoise_2.0.1 httpuv_1.6.11 Rcpp_1.0.11 #> [76] svglite_2.1.1 coda_0.19-4 xfun_0.40 #> [79] fs_1.6.3 usethis_2.2.2 runjags_2.2.2-1.1 #> [82] pkgconfig_2.0.3"},{"path":[]},{"path":"https://openpharma.github.io/rbqmR/reference/applyQtl.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter a Tibble to Obtain Values Outside a QTL — applyQtl","title":"Filter a Tibble to Obtain Values Outside a QTL — applyQtl","text":"Given input tibble column, filter tibble retain rows value column lies outside range given upper lower limits, optional.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/applyQtl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter a Tibble to Obtain Values Outside a QTL — applyQtl","text":"","code":"applyQtl(data, var, lower = NULL, upper = NULL)"},{"path":"https://openpharma.github.io/rbqmR/reference/applyQtl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter a Tibble to Obtain Values Outside a QTL — applyQtl","text":"data input tibble var name column filter. Uses NSE. lower lower limit. May NULL. upper upper limit. May NULL.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/applyQtl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter a Tibble to Obtain Values Outside a QTL — applyQtl","text":"filtered tibble","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/berrySubject.html","id":null,"dir":"Reference","previous_headings":"","what":"Data derived and adapted from Berry et al (2011) pp 52-63 — berrySubject","title":"Data derived and adapted from Berry et al (2011) pp 52-63 — berrySubject","text":"dataset subject event flags","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/berrySubject.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data derived and adapted from Berry et al (2011) pp 52-63 — berrySubject","text":"","code":"berrySubject"},{"path":"https://openpharma.github.io/rbqmR/reference/berrySubject.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Data derived and adapted from Berry et al (2011) pp 52-63 — berrySubject","text":"tibble 150 rows 3 columns Site site ID SubjectID subject ID Event Whether subject experienced event","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/berrySummary.html","id":null,"dir":"Reference","previous_headings":"","what":"Data adapted from Berry et al (2011) pp 52-63 — berrySummary","title":"Data adapted from Berry et al (2011) pp 52-63 — berrySummary","text":"dataset subject event counts site","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/berrySummary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data adapted from Berry et al (2011) pp 52-63 — berrySummary","text":"","code":"berrySummary"},{"path":"https://openpharma.github.io/rbqmR/reference/berrySummary.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Data adapted from Berry et al (2011) pp 52-63 — berrySummary","text":"tibble 9 rows 4 columns Site site ID Subjects number subjects site Events number subjects ith least one event site ObservedResponse observed response rate Events/Subjects site","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/cavalryDeaths.html","id":null,"dir":"Reference","previous_headings":"","what":"The Bortkiewicz cavalry dataset — cavalryDeaths","title":"The Bortkiewicz cavalry dataset — cavalryDeaths","text":"dataset number Prussian cavalry soldiers kicked death horses","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/cavalryDeaths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Bortkiewicz cavalry dataset — cavalryDeaths","text":"","code":"cavalryDeaths"},{"path":"https://openpharma.github.io/rbqmR/reference/cavalryDeaths.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"The Bortkiewicz cavalry dataset — cavalryDeaths","text":"tibble 280 rows 3 variables: Corps corps Year year Deaths number deaths given corps given year","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/cavalryDeaths.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"The Bortkiewicz cavalry dataset — cavalryDeaths","text":"https://archive.org/details/dasgesetzderklei00bortrich","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/createObservedMinusExpectedPlot.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an Observed Minus Expected Plot — createObservedMinusExpectedPlot","title":"Create an Observed Minus Expected Plot — createObservedMinusExpectedPlot","text":"Given input data.frame, create corresponding observed-expected plot option upper lower warning limits optional upper lower action limits","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/createObservedMinusExpectedPlot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an Observed Minus Expected Plot — createObservedMinusExpectedPlot","text":"","code":"createObservedMinusExpectedPlot( data, indexVar = SubjectIndex, upperActionLimit = UpperActionLimit, lowerActionLimit = LowerActionLimit, upperWarningLimit = UpperWarningLimit, lowerWarningLimit = LowerWarningLimit, warningQuantiles = c(lower = 0.01, upper = 0.99), permittedRates = c(lower = 0.05, upper = 0.15) )"},{"path":"https://openpharma.github.io/rbqmR/reference/createObservedMinusExpectedPlot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an Observed Minus Expected Plot — createObservedMinusExpectedPlot","text":"data input data.frame indexVar column data defines sequence participants enrolled. integer vector values 1 n, n number participants enrolled. upperActionLimit column data defines upper action limit. NULL, upper action limit omitted plot. lowerActionLimit column data defines lower action limit. NULL, lower action limit omitted plot. upperWarningLimit column data defines upper warning limit. NULL, upper warning limit omitted plot. lowerWarningLimit column data defines lower warning limit. NULL, lower warning limit omitted plot. warningQuantiles named numeric vector elements upper lower containing quantiles binomial distribution define warning limits. Used labelling. NULL, corresponding footer omitted plot. Individual elements may NA. permittedRates named numeric vector elements upper lower containing observed event rates define action limits. Used labelling. NULL, corresponding footer omitted plot. Individual elements may NA.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/createObservedMinusExpectedTable.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a data.frame containing the results of an Observed - Expected Analysis — createObservedMinusExpectedTable","title":"Create a data.frame containing the results of an Observed - Expected Analysis — createObservedMinusExpectedTable","text":"Create data.frame containing results Observed - Expected Analysis","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/createObservedMinusExpectedTable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a data.frame containing the results of an Observed - Expected Analysis — createObservedMinusExpectedTable","text":"","code":"createObservedMinusExpectedTable( data, timeVar, eventVar, eventArray, expectedRate, cumulativeVar = CumulativeEvents, observedMinusExpectedVar = ObservedMinusExpected, indexVar = SubjectIndex, statusVar = Status, maxTrialSize = NA, upperActionLimit = UpperActionLimit, lowerActionLimit = LowerActionLimit, upperWarningLimit = UpperWarningLimit, lowerWarningLimit = LowerWarningLimit, warningQuantiles = c(lower = 0.01, upper = 0.99), permittedRates = c(lower = 0.05, upper = 0.15) )"},{"path":"https://openpharma.github.io/rbqmR/reference/createObservedMinusExpectedTable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a data.frame containing the results of an Observed - Expected Analysis — createObservedMinusExpectedTable","text":"data input data.frame. Required. timeVar column data defines order participants enrolled. Required. eventVar column data defines whether participant experienced event. Required. eventArray array defining values eventVar indicate corresponding participant experienced event. Required. expectedRate scalar defines participant-level event rate expected. Required. cumulativeVar name column output data.frame contains cumulative sum events. Uses tidy evaluation. observedMinusExpectedVar name column output data.frame contains calculated observed - expected statistic participant. Uses tidy evaluation. indexVar name column output data.frame contains index participant's enrolment: integer 1 n n number participants enrolled. Uses tidy evaluation. statusVar name column output data.frame contains status trial: either OK, WARN BREECH maxTrialSize scalar integer defining maximum possible size trial. Can NULL. upperActionLimit name column output data.frame contains upper action limit participant. Uses tidy evaluation. lowerActionLimit name column output data.frame contains lower action limit participant. Uses tidy evaluation. upperWarningLimit name column output data.frame contains upper warning limit participant. Uses tidy evaluation. lowerWarningLimit name column output data.frame contains lower warning limit participant. Uses tidy evaluation. warningQuantiles named numeric vector length 2 elements lower upper define quantiles binomial distribution define warning limits. Individual elements may NA. NULL, lowerWarningLimit upperWarningLimit ignored corresponding columns added output data.frame permittedRates named numeric vector length 2 elements lower upper define observed event rates define action limits. Individual elements may NA. NULL, lowerActionLimit upperActionLimit ignored corresponding columns added output data.frame","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/createObservedOverExpectedPlot.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an Observed Over Expected Plot — createObservedOverExpectedPlot","title":"Create an Observed Over Expected Plot — createObservedOverExpectedPlot","text":"Given tibble created createObservedOverExpectedTable create observed expected plot.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/createObservedOverExpectedPlot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an Observed Over Expected Plot — createObservedOverExpectedPlot","text":"","code":"createObservedOverExpectedPlot( data, n = NObserved, observedRate = NULL, alpha = 0.05, sides = c(\"two\", \"lower\", \"upper\") )"},{"path":"https://openpharma.github.io/rbqmR/reference/createObservedOverExpectedPlot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an Observed Over Expected Plot — createObservedOverExpectedPlot","text":"data tibble containing calculated limits n column data defines sample size corresponding limit(s) relate(s) observedRate column data defines observed rate. May NULL. alpha Type 1 error rate associated calculated limits. Default 0.05 sides sidedness alpha. Either two, upper lower. Default two.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/createObservedOverExpectedPlot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an Observed Over Expected Plot — createObservedOverExpectedPlot","text":"ggplot2 object containing requested plot","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/createObservedOverExpectedTable.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an Observed Over Expected Grid Using the work of Katz et al (1978) calculate acceptable limits for the ratio of two binomial proportions. The Type 1 error rate can be specified, and the limits can be one- or two-sided. — createObservedOverExpectedTable","title":"Create an Observed Over Expected Grid Using the work of Katz et al (1978) calculate acceptable limits for the ratio of two binomial proportions. The Type 1 error rate can be specified, and the limits can be one- or two-sided. — createObservedOverExpectedTable","text":"Create Observed Expected Grid Using work Katz et al (1978) calculate acceptable limits ratio two binomial proportions. Type 1 error rate can specified, limits can one- two-sided.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/createObservedOverExpectedTable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an Observed Over Expected Grid Using the work of Katz et al (1978) calculate acceptable limits for the ratio of two binomial proportions. The Type 1 error rate can be specified, and the limits can be one- or two-sided. — createObservedOverExpectedTable","text":"","code":"createObservedOverExpectedTable( observedData = NULL, observedRate = NULL, n = NObserved, nHistorical, nObservedRange = seq(50, 1500, 25), expectedRate, historicalRate, alpha = 0.05, sides = c(\"two\", \"lower\", \"upper\") )"},{"path":"https://openpharma.github.io/rbqmR/reference/createObservedOverExpectedTable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an Observed Over Expected Grid Using the work of Katz et al (1978) calculate acceptable limits for the ratio of two binomial proportions. The Type 1 error rate can be specified, and the limits can be one- or two-sided. — createObservedOverExpectedTable","text":"observedData tibble containing observed data compared calculated limit(s). May NULL. observedRate column observedData contains observed rates. Ignored observedData NULL. Uses tidy evaluation. n column observedData (NULL) output tibble defines sample size corresponding limit(s) relate(s). nHistorical number observations historical rate based nObservedRange sequence values limits calculated expectedRate event rate expected current study. Usually historicalRate, need . historicalRate event rate observed historical data alpha Type 1 error rate associated calculated limits. Default 0.05 sides sidedness alpha. Either two, upper lower. Default two.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/createObservedOverExpectedTable.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an Observed Over Expected Grid Using the work of Katz et al (1978) calculate acceptable limits for the ratio of two binomial proportions. The Type 1 error rate can be specified, and the limits can be one- or two-sided. — createObservedOverExpectedTable","text":"tibble","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/createQtlBubblePlot.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a QTL bubble plot — createQtlBubblePlot","title":"Create a QTL bubble plot — createQtlBubblePlot","text":"Create QTL bubble plot","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/createQtlBubblePlot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a QTL bubble plot — createQtlBubblePlot","text":"","code":"createQtlBubblePlot( d, x, y, size, group = NULL, limits = NULL, summarise = FALSE, summarize = summarise, stat = NULL, jitterHeight = 0, jitterWidth = NULL, showBox = TRUE, boxFill = \"steelblue2\", boxColour = boxFill, boxColor = boxColour, boxAlpha = 0.25, boxWidth = 0.5, showLegend = TRUE, ... )"},{"path":"https://openpharma.github.io/rbqmR/reference/createQtlBubblePlot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a QTL bubble plot — createQtlBubblePlot","text":"d data frame containing data plotted x column data appear x-axis y column data appear y-axis size column data defines size bubbles group Default: NULL column data defines fill colour bubbles limits Default: NULL list defining characteristics horizontal reference lines appear plot. See Usage notes . summarise Default: FALSE input data frame summarised derive plotted statistics? See Usage notes summarize Default: summarise US English equivalent summarise stat Default: NULL summary function used summarise data. NULL summarise TRUE. See Usage notes jitterHeight Default: 0. Value height parameter call geom_jitter. default value implies vertical jittering. jitterWidth Default: NULL. Value width parameter call geom_jitter. default value implies 40% horizontal jitter. showBox Default: TRUE show unjittered box--whisker plot value x?. boxFill Default: \"steelblue2\": colour box--whisker plot filled boxColour Default: boxFill: colour outline box--whisker plot drawn boxColor Default: boxColour: US-English version boxColour boxAlpha Default: 0.25 transparency box--whisker plot. alpha=0, box invisible. alpha=1, box totally opaque. boxWidth Default: 0.5 width box box--whisker plot, units used x-axis showLegend Default: TRUE legend defined group appear plot ... additional parameters passed ggplot2 functions stat","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/createQtlBubblePlot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a QTL bubble plot — createQtlBubblePlot","text":"gg object","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/createQtlBubblePlot.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage notes","title":"Create a QTL bubble plot — createQtlBubblePlot","text":"limits list lists, element defines label (default \"\"), colour (default \"black\"), line type (default \"solid\"), y co-ordinate (default 1), x co-ordinate (default 0), vertical offset (vjust) (default -1) reference line. element component lists missing, warning issued default value supplied. example: limits=list(list(label=\"QTL (12%)\", colour=\"red\", type=\"dashed\", y=12, x=1.5, vjust=-1),list(label=\"Sec Lim (8%)\", colour=\"goldenrod\", type=\"dotted\", y=58, x=1.25, vjust=-1)) summarise TRUE, (participant-level) information data summarised plot created. data grouped group x y=stat(y) size=sum(size) calculated, x, y, size stat parameters defined .","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/createQtlPlot.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary Plot of Observed Event Rates/Proportions — createQtlPlot","title":"Summary Plot of Observed Event Rates/Proportions — createQtlPlot","text":"Summary Plot Observed Event Rates/Proportions","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/createQtlPlot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary Plot of Observed Event Rates/Proportions — createQtlPlot","text":"","code":"createQtlPlot( data, metric = p, siteData = NULL, targetRange = NULL, actionLimits = NULL, warningLimits = NULL, observedMetric = NULL, siteSize = NULL, siteMetric = NULL )"},{"path":"https://openpharma.github.io/rbqmR/reference/createQtlPlot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary Plot of Observed Event Rates/Proportions — createQtlPlot","text":"data tibble containing MCMC samples density required metric column data contains sampled values metric evaluated siteData tibble containing observed site specific data targetRange tibble containing lower upper limits target range metric actionLimits list named vector defining action limits appear graph. See [shadeRange] details. May NA NULL. warningLimits list named vector defining action limits appear graph. See [shadeRange] details. May NA NULL. observedMetric observed value metric siteSize column siteData defines sample size site. Uses tidyselect. Ignored siteData NULL siteMetric column siteData defines KRI site. Uses tidyselect. Ignored siteData NULL.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-assertColumnDoesNotExist.html","id":null,"dir":"Reference","previous_headings":"","what":"Throw an exception of the given column DOES exist in the given data.frame — .assertColumnDoesNotExist","title":"Throw an exception of the given column DOES exist in the given data.frame — .assertColumnDoesNotExist","text":"Throw exception given column exist given data.frame","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-assertColumnDoesNotExist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Throw an exception of the given column DOES exist in the given data.frame — .assertColumnDoesNotExist","text":"","code":".assertColumnDoesNotExist(data, col)"},{"path":"https://openpharma.github.io/rbqmR/reference/dot-assertColumnDoesNotExist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Throw an exception of the given column DOES exist in the given data.frame — .assertColumnDoesNotExist","text":"data data.frame searched col name column searched","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-assertColumnDoesNotExist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Throw an exception of the given column DOES exist in the given data.frame — .assertColumnDoesNotExist","text":"NULL","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-assertColumnDoesNotExist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Throw an exception of the given column DOES exist in the given data.frame — .assertColumnDoesNotExist","text":"","code":"# tibble::tibble(good=1) %>% .assertColumnExists(good) # No exception # tibble::tibble(good=1) %>% .assertColumnExists(bad) # Exception"},{"path":"https://openpharma.github.io/rbqmR/reference/dot-assertColumnExists.html","id":null,"dir":"Reference","previous_headings":"","what":"Throw an exception of the given column DOES NOT exist in the given data.frame — .assertColumnExists","title":"Throw an exception of the given column DOES NOT exist in the given data.frame — .assertColumnExists","text":"Throw exception given column exist given data.frame","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-assertColumnExists.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Throw an exception of the given column DOES NOT exist in the given data.frame — .assertColumnExists","text":"","code":".assertColumnExists(data, col)"},{"path":"https://openpharma.github.io/rbqmR/reference/dot-assertColumnExists.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Throw an exception of the given column DOES NOT exist in the given data.frame — .assertColumnExists","text":"data data.frame searched col name column searched","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-assertColumnExists.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Throw an exception of the given column DOES NOT exist in the given data.frame — .assertColumnExists","text":"NULL","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-assertColumnExists.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Throw an exception of the given column DOES NOT exist in the given data.frame — .assertColumnExists","text":"","code":"# tibble::tibble(good=1) %>% .assertColumnExists(good) # No exception # tibble::tibble(good=1) %>% .assertColumnExists(bad) # Exception"},{"path":"https://openpharma.github.io/rbqmR/reference/dot-autorunJagsAndCaptureOutput.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit an MCMC model to a dataset, capture and log JAGS messages — .autorunJagsAndCaptureOutput","title":"Fit an MCMC model to a dataset, capture and log JAGS messages — .autorunJagsAndCaptureOutput","text":"Fit MCMC model dataset, capture log JAGS messages","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-autorunJagsAndCaptureOutput.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit an MCMC model to a dataset, capture and log JAGS messages — .autorunJagsAndCaptureOutput","text":"","code":".autorunJagsAndCaptureOutput( data, modelString, monitor, inits = NULL, returnClass = \"binomialModel\", max.time = 600, ... )"},{"path":"https://openpharma.github.io/rbqmR/reference/dot-autorunJagsAndCaptureOutput.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit an MCMC model to a dataset, capture and log JAGS messages — .autorunJagsAndCaptureOutput","text":"data JAGS data list modelString JAGS model string monitor vector names parameters monitor inits inits used JAGS model returnClass class prepend class tab element returned value max.time maximum time allowed model fitting, ... parameters passed autorun.jags","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-columnExists.html","id":null,"dir":"Reference","previous_headings":"","what":"Determine if a column, passed using NSE, exists in a data.frame — .columnExists","title":"Determine if a column, passed using NSE, exists in a data.frame — .columnExists","text":"Determine column, passed using NSE, exists data.frame","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-columnExists.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Determine if a column, passed using NSE, exists in a data.frame — .columnExists","text":"","code":".columnExists(data, col)"},{"path":"https://openpharma.github.io/rbqmR/reference/dot-columnExists.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Determine if a column, passed using NSE, exists in a data.frame — .columnExists","text":"data data.frame searched col name column searched","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-columnExists.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Determine if a column, passed using NSE, exists in a data.frame — .columnExists","text":"TRUE column exists, FALSE otherwise","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-columnExists.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Determine if a column, passed using NSE, exists in a data.frame — .columnExists","text":"","code":"# tibble::tibble(good=1) %>% .columnExists(good) # TRUE # tibble::tibble(good=1) %>% .columnExists(bad) # FALSE"},{"path":"https://openpharma.github.io/rbqmR/reference/dot-createBinomialInit.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createBinomialInit","title":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createBinomialInit","text":"Initial values p chosen uniformly random range 0.001 0.999 inclusive.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-createBinomialInit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createBinomialInit","text":"","code":".createBinomialInit( gammaA = c(shape = 1, scale = 10), gammaB = c(shape = 1, scale = 10), seed = NULL, quantiles = NULL, rng = c(\"base::Mersenne-Twister\", \"base::Wichmann-Hill\", \"base::Marsaglia-Multicarry\", \"base::Super-Duper\"), n = 1 )"},{"path":"https://openpharma.github.io/rbqmR/reference/dot-createBinomialInit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createBinomialInit","text":"gammaA vector elements named shape scale define hyper prior Beta prior p. gammaB vector elements named shape scale define hyper prior b Beta prior p. seed scalar containing seed used init. NULL, default, indicates random seed used. clear runjags JAGS manuals range permissible seed values , positive integers appear acceptable. quantiles Default NULL. NULL, starting values b chosen random. Otherwise, starting values defined values supplied quantiles. See Usage Notes . rng random number generator used init n length initialisation vector p","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-createBinomialInit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createBinomialInit","text":"init: list elements named p, , b, RNG.name RNG.seed.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-createBinomialInit.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage Notes","title":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createBinomialInit","text":"quantiles parameter provides flexible way defining starting values hyperparameters b. NULL, default, starting values random values either gammaA () gammaB (b). Otherwise, quantiles numeric vector length 2 values (named b) either NA range (0, 1). NA, corresponding staring value chosen random, . Otherwise, value x, starting value hyperparameter xth quantile corresponding Gamma distribution. example, quantiles=c(\"\"=NA, \"b\"=50), starting value random value drawn distribution defined gammaA starting value b 50th centile distribution defined gammaB.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-createPoissonInit.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createPoissonInit","title":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createPoissonInit","text":"Create JAGS inits suitable use run.jags autorun.jags","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-createPoissonInit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createPoissonInit","text":"","code":".createPoissonInit( gammaShape = c(shape = 1, scale = 10), gammaScale = c(shape = 1, scale = 10), seed = NULL, quantiles = NULL, rng = c(\"base::Mersenne-Twister\", \"base::Wichmann-Hill\", \"base::Marsaglia-Multicarry\", \"base::Super-Duper\"), n = 1 )"},{"path":"https://openpharma.github.io/rbqmR/reference/dot-createPoissonInit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createPoissonInit","text":"gammaShape named vector defining shape scale parameters gamma hyperprior shape parameter gammaScale named vector defining shape scale parameters gamma hyperprior scale parameter seed seed use generating random seeds MCMC processes quantiles Default NULL. NULL, starting values b chosen random. Otherwise, starting values defined values supplied quantiles. See Usage Notes . rng random number generator used init n length initialisation vector lambda","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-ensureLimitsAreNamed.html","id":null,"dir":"Reference","previous_headings":"","what":"Ensures that a vector or scalar is named according to standard rules — .ensureLimitsAreNamed","title":"Ensures that a vector or scalar is named according to standard rules — .ensureLimitsAreNamed","text":"Ensures vector scalar named according standard rules","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-ensureLimitsAreNamed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ensures that a vector or scalar is named according to standard rules — .ensureLimitsAreNamed","text":"","code":".ensureLimitsAreNamed(x, decreasing = FALSE, nameStrings = NULL)"},{"path":"https://openpharma.github.io/rbqmR/reference/dot-ensureLimitsAreNamed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ensures that a vector or scalar is named according to standard rules — .ensureLimitsAreNamed","text":"x vector (scalar) named decreasing naming required, x sorted? nameStrings optional vector provides names used. See Usage Notes ","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-ensureLimitsAreNamed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Ensures that a vector or scalar is named according to standard rules — .ensureLimitsAreNamed","text":"x NULL named, returned unaltered. Otherwise, first sorted according descending names names assigned order.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/dot-ensureLimitsAreNamed.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage Notes","title":"Ensures that a vector or scalar is named according to standard rules — .ensureLimitsAreNamed","text":"nameStrings NULL, length must greater equal length x. Otherwise, names determined follows: length(x) 1, name nameString's single element \"action\" 2, names nameString's elements \"action\" \"warn\", order 2 , nameString's elements character equivalent integers 1 length(x). Otherwise t","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateCustomQTL.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply an arbitrary QTL rule to a tibble — evaluateCustomQTL","title":"Apply an arbitrary QTL rule to a tibble — evaluateCustomQTL","text":"function requires two tibbles function, plus arbitrary arguments. One tibble contains observed site level metrics. tibble contains posterior estimate distribution metric. Applying function determine () whether QTL breached (level - eg action warning) (b) observations site level tibble contribute breach.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateCustomQTL.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply an arbitrary QTL rule to a tibble — evaluateCustomQTL","text":"","code":"evaluateCustomQTL(data, posterior, f, statusCol = Status, ...)"},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateCustomQTL.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply an arbitrary QTL rule to a tibble — evaluateCustomQTL","text":"data tibble containing site-level observed metrics posterior tibble containing posterior distribution metric, usually obtained fit Bayes model function. f function evaluates QTL. first two parameters f data posterior defined . statusCol name column augmented data tibble defines status corresponding row ... arguments passed f.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateCustomQTL.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Apply an arbitrary QTL rule to a tibble — evaluateCustomQTL","text":"list containing least two elements. One element character string named status reports status QTL rule. QTL breached, value element \"OK\". values depend actions f, use consistent nomenclature recommended. Functions provided rbqmR package return values \"WARNING\" \"ACTION\". second elements named data contains copy data tibble augmented statusCol. elements return value depend actions f.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateCustomQTL.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Apply an arbitrary QTL rule to a tibble — evaluateCustomQTL","text":"functions serves common basis specific QTL rules may evaluated also avenue evaluation study- specific custom QTL rules may evaluated.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluatePointEstimateQTL.html","id":null,"dir":"Reference","previous_headings":"","what":"Compares a scalar statistic derived from the posterior with one or more fixed values — evaluatePointEstimateQTL","title":"Compares a scalar statistic derived from the posterior with one or more fixed values — evaluatePointEstimateQTL","text":"Compares scalar statistic derived posterior one fixed values","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluatePointEstimateQTL.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compares a scalar statistic derived from the posterior with one or more fixed values — evaluatePointEstimateQTL","text":"","code":"evaluatePointEstimateQTL( data, posterior, metric, stat = mean, observedMetric, statusCol = Status, lower = NULL, upper = NULL )"},{"path":"https://openpharma.github.io/rbqmR/reference/evaluatePointEstimateQTL.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compares a scalar statistic derived from the posterior with one or more fixed values — evaluatePointEstimateQTL","text":"data tibble containing site-level observed metrics (KRIs) posterior tibble containing posterior distribution metric column posterior metric based stat summary statistic calculated values metric. Default: mean. observedMetric column data containing site level observed metrics (KRIs) statusCol name column added data contain site-level flags comparing corresponding KRI QTL thresholds defined lower upper lower scalar vector lower limits, NULL. See Usage Notes . upper scalar vector upper limits, NULL. See Usage Notes .","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluatePointEstimateQTL.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compares a scalar statistic derived from the posterior with one or more fixed values — evaluatePointEstimateQTL","text":"list three elements named status, data qtl. status \"OK\", breach QTL detected. Otherwise, status equal name serious breach QTL determined values either lower upper. qtl contains value stat function applied metric.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluatePointEstimateQTL.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage Notes","title":"Compares a scalar statistic derived from the posterior with one or more fixed values — evaluatePointEstimateQTL","text":"lower upper NULL. follows, limit refers lower upper. limit names, names used. Otherwise, names assigned based length limit. length(limit) 1, single element named \"action\". length(limit) 2, two elements named \"warn\" \"action\". (case, limit first sorted appropriately.) length(limit) >2, elements named \"1\" \"n\" n length(limit).","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluatePointEstimateQTL.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compares a scalar statistic derived from the posterior with one or more fixed values — evaluatePointEstimateQTL","text":"","code":"post <- (berrySummary %>% fitBayesBinomialModel(Subjects, Events))$tab #> Loading required namespace: rjags #> INFO [2024-06-17 08:46:57] Status of model fitting: OK"},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateProbabilityInRangeQTL.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluates a QTL based on prob(study-level metric lies within a range) — evaluateProbabilityInRangeQTL","title":"Evaluates a QTL based on prob(study-level metric lies within a range) — evaluateProbabilityInRangeQTL","text":"Evaluates probability study-level metric lies within given range based posterior density provided call fit Bayes XXXX Model function. Action warning limits determined parameters range probs. , single range metric, various limits defined, based element probs. Site-level KRIs flagged based values lower upper.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateProbabilityInRangeQTL.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluates a QTL based on prob(study-level metric lies within a range) — evaluateProbabilityInRangeQTL","text":"","code":"evaluateProbabilityInRangeQTL( data, posterior, metric, observedMetric, statusCol = Status, range, probs, lower = NULL, upper = NULL )"},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateProbabilityInRangeQTL.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluates a QTL based on prob(study-level metric lies within a range) — evaluateProbabilityInRangeQTL","text":"data tibble containing site-level observed metrics (KRIs) posterior tibble containing posterior distribution , metric, usually obtained fit Bayes model function. metric column posterior QTL based observedMetric column data containing site level observed metrics (KRIs) statusCol name column added data contain site-level flags comparing corresponding KRI QTL thresholds defined lower upper range range values metric used calculating qtl = Prob(metric range). probs thresholds Prob(metric range) define action warning limits QTL lower scalar vector lower limits, NULL. See Usage Notes . upper scalar vector upper limits, NULL. See Usage Notes .","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateProbabilityInRangeQTL.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluates a QTL based on prob(study-level metric lies within a range) — evaluateProbabilityInRangeQTL","text":"list three elements named status, data qtl. status \"OK\", breach QTL detected. Otherwise, status equal name serious breach QTL determined values either lower upper. qtl contains posterior probability metric lies within range.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateProbabilityInRangeQTL.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Evaluates a QTL based on prob(study-level metric lies within a range) — evaluateProbabilityInRangeQTL","text":"details, see Usage Notes .","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateProbabilityInRangeQTL.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage Notes","title":"Evaluates a QTL based on prob(study-level metric lies within a range) — evaluateProbabilityInRangeQTL","text":"Either lower upper can NULL. follows, limit refers lower upper. #' limit names, names used. Otherwise, names assigned based length limit. length(limit) 1, single element named \"action\". length(limit) 2, two elements named \"warn\" \"action\". (case, limit first sorted appropriately.) length(limit) >2, elements named \"1\" \"n\" n length(limit).","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateSiteMetricQTL.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluates a QTL based on the proportion of site level KRIs within a range — evaluateSiteMetricQTL","title":"Evaluates a QTL based on the proportion of site level KRIs within a range — evaluateSiteMetricQTL","text":"Calculates proportion site-level KRIs lie within range defined quantiles posterior density provided call fit Bayes XXXX Model function.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateSiteMetricQTL.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluates a QTL based on the proportion of site level KRIs within a range — evaluateSiteMetricQTL","text":"","code":"evaluateSiteMetricQTL( data, posterior, metric, observedMetric, statusCol = Status, statusFunc = NULL, lower = NULL, upper = NULL )"},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateSiteMetricQTL.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluates a QTL based on the proportion of site level KRIs within a range — evaluateSiteMetricQTL","text":"data tibble containing site-level observed metrics (KRIs) posterior tibble containing posterior distribution , metric, usually obtained fit Bayes model function. metric column posterior QTL based observedMetric column data containing site level observed metrics (KRIs) statusCol name column added data contain site-level flags comparing corresponding KRI QTL thresholds defined lower upper statusFunc function takes single argument qtl element return value converts status string lower scalar vector lower limits, NULL. See Usage Notes . upper scalar vector upper limits, NULL. See Usage Notes .","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateSiteMetricQTL.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluates a QTL based on the proportion of site level KRIs within a range — evaluateSiteMetricQTL","text":"list three elements named status, data qtl. status \"OK\", breach QTL detected. Otherwise, status equal name serious breach QTL determined values either lower upper. qtl tibble whose rows provide counts number sites whose KRIs lie ranges defined lower upper. addition, quantiles element provides conversion quantiles posterior distribution metric values metric .","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateSiteMetricQTL.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Evaluates a QTL based on the proportion of site level KRIs within a range — evaluateSiteMetricQTL","text":"details, see Usage Notes .","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/evaluateSiteMetricQTL.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage Notes","title":"Evaluates a QTL based on the proportion of site level KRIs within a range — evaluateSiteMetricQTL","text":"Either lower upper can NULL. follows, limit refers lower upper. #' limit names, names used. Otherwise, names assigned based length limit. length(limit) 1, single element named \"action\". length(limit) 2, two elements named \"warn\" \"action\". (case, limit first sorted appropriately.) length(limit) >2, elements named \"1\" \"n\" n length(limit). statusFunc NULL, status element return value set \"OK\" default.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/fitBayesBinomialModel.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit an MCMC Binomial Model to site-specific Counts — fitBayesBinomialModel","title":"Fit an MCMC Binomial Model to site-specific Counts — fitBayesBinomialModel","text":"Given set event counts patient numbers multiple sites, event can occur per patient, fit Bayesian hierarchical Binomial model site-specific event counts.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/fitBayesBinomialModel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit an MCMC Binomial Model to site-specific Counts — fitBayesBinomialModel","text":"","code":"fitBayesBinomialModel( data, n, r, model = NULL, inits = NULL, nChains = ifelse(is.null(inits), 2, length(inits)), ... )"},{"path":"https://openpharma.github.io/rbqmR/reference/fitBayesBinomialModel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit an MCMC Binomial Model to site-specific Counts — fitBayesBinomialModel","text":"data data.frame containing participant event counts n column data containing participant counts. Uses tidy evaluation r column data containing event counts. Uses tidy evaluation model character string containing JAGS model fitted. NULL, obtained getModelString(\"binomial). inits list JAGS inits lists suitable use model. NULL (default), nChains random inits generated .createBinomialInit. nChains number chains use. Default 2. inits NULL, must equal length(inits) NULL. ... passed .createBinomialInits .autorunJagsAndCaptureOutput","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/fitBayesBinomialModel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit an MCMC Binomial Model to site-specific Counts — fitBayesBinomialModel","text":"tibble four columns p Simulated values posterior distribution event probabilities. shape1 Simulated values posterior distribution first shape parameter Beta distribution p. shape2 Simulated values posterior distribution second shape parameter Beta distribution p. q Percentile p value falls.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/fitBayesBinomialModel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit an MCMC Binomial Model to site-specific Counts — fitBayesBinomialModel","text":"count patients experiencing event given site assumed follow Binomial distribution, standard statistical distribution expresses probability given number events fixed number possible events. probability depends site-specific probability event occur single patient p_i total number patients site. site-specific probabilities, p_i, assumed follow Beta distribution; continuous distribution values 0 1, two parameters, b, determine shape skewness distribution. Uncertainty parameters Beta distribution accounted specifying prior distributions parameters. \"hyperpriors\" specified Gamma distributions. parameters hyper-priors specified b. default settings specify Gamma(1, 10) distributions allow bell-shaped distributions 0.05 < p_i < 0.95, put low probability precise distributions. Bayesian Hierarchical Model estimates posterior distribution unknown parameters p_i, b, given observed events. Bayes Theorem proportional likelihood observed data given parameters multiplied prior parameters. prior can informed historical data /expert knowledge. data available, posterior less influenced prior influenced data. exact posterior distribution computed directly, hence Markov Chain Monte Carlo (MCMC) method used simulate values p_i, b posterior distribution. number Markov chains can used, minimum 10,000 values simulated 4000 burn-iterations 1000 adaptive iterations. chains checked convergence simulation extended required satisfy basic convergence tests. samples chains combined returned value.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/fitBayesBinomialModel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fit an MCMC Binomial Model to site-specific Counts — fitBayesBinomialModel","text":"","code":"results <- berrySummary %>% fitBayesBinomialModel( n=Subjects, r=Events ) #> INFO [2024-06-17 08:47:00] Status of model fitting: OK"},{"path":"https://openpharma.github.io/rbqmR/reference/fitBayesPoissonModel.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit an MCMC Poisson Model to Site-specific Event Rates — fitBayesPoissonModel","title":"Fit an MCMC Poisson Model to Site-specific Event Rates — fitBayesPoissonModel","text":"Given set event data multiple sites, fit Bayesian hierarchical Poisson model site-specific event rates.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/fitBayesPoissonModel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit an MCMC Poisson Model to Site-specific Event Rates — fitBayesPoissonModel","text":"","code":"fitBayesPoissonModel( data, events = NULL, exposure = NULL, model = NULL, inits = NULL, nChains = ifelse(is.null(inits), 2, length(inits)), ... )"},{"path":"https://openpharma.github.io/rbqmR/reference/fitBayesPoissonModel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit an MCMC Poisson Model to Site-specific Event Rates — fitBayesPoissonModel","text":"data data frame containing eventVar exposureVar columns events number events per site. NULL \"posterior\" distribution MCMC samples prior. exposure exposure per site. NULL \"posterior\" distribution MCMC samples prior. model character string containing JAGS model fitted. NULL, obtained getModelString(\"binomial). inits list JAGS inits lists suitable use model. NULL (default), nChains random inits generated .createPoissonInit. nChains number chains use. Default 2. inits NULL, must equal length(inits) NULL. ... passed .createPoissonInit .autorunJagsAndCaptureOutput","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/fitBayesPoissonModel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit an MCMC Poisson Model to Site-specific Event Rates — fitBayesPoissonModel","text":"tibble four columns lambda Simulated values posterior distribution rates. shape Simulated values posterior distribution shape. scale Simulated values posterior distribution scale. q Percentile lambda value falls.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/fitBayesPoissonModel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit an MCMC Poisson Model to Site-specific Event Rates — fitBayesPoissonModel","text":"Adverse events given site assumed follow Poisson distribution, standard statistical distribution expresses probability given number events fixed time interval. probability depends site-specific rate parameter \\(\\lambda_i\\) multiplied exposure (total time treatment patients site). site-specific event rates, \\(\\lambda_i\\), assumed follow Gamma distribution; positive continuous distribution two parameters, shape scale, determine average rate spread probability different rates around average. Uncertainty shape scale distribution accounted specifying prior distributions parameters. \"hyper-priors\" also specified Gamma distributions. parameters hyper-priors specified shape scale. default settings specify Gamma(1, 1) distributions equivalent Exp(1) distributions. Bayesian Hierarchical Model estimates posterior distribution unknown parameters \\(\\lambda_i\\), scale shape, given observed events. Bayes Theorem proportional likelihood observed data given parameters multiplied prior parameters. prior can informed historical data /expert knowledge. data available, posterior less influenced prior influenced data. exact posterior distribution computed directly, hence Markov Chain Monte Carlo (MCMC) method used simulate values \\(\\lambda_i\\), scale shape posterior distribution. Two Markov chains used, minimum 10,000 values simulated 4000 burn-iterations 1000 adaptive iterations. chains checked convergence simulation extended required meet convergence diagnostics. samples chains combined returned value.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/fitBayesPoissonModel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fit an MCMC Poisson Model to Site-specific Event Rates — fitBayesPoissonModel","text":"","code":"# load example site rates data(siteRates) # fit MCMC Poisson model with default hyperpriors (basis 1 month) results <- siteRates %>% fitBayesPoissonModel(Events, Exposure) #> INFO [2024-06-17 08:47:03] Status of model fitting: OK"},{"path":"https://openpharma.github.io/rbqmR/reference/getModelString.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to obtain the string that defines the default JAGS model for each data type — getModelString","title":"Function to obtain the string that defines the default JAGS model for each data type — getModelString","text":"Function obtain string defines default JAGS model data type","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/getModelString.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to obtain the string that defines the default JAGS model for each data type — getModelString","text":"","code":"getModelString( label = c(\"binary\", \"binomial\", \"normal\", \"poisson\", \"tte\"), hyperParams = list(binomial = c(`` = \"dunif(0, 10)\", `` = \"dunif(0, 10)\"), binary = c(`` = \"dunif(0, 10)\", `` = \"dunif(0, 10)\"), normal = c(`` = \"dnorm(0, 1e-06)\", `` = \"dgamma(1e-06, 1e-06)\"), poisson = c(`` = \"dgamma(1, 1)\", `` = \"dgamma(1, 1)\"), tte = c(`` = \"dnorm(0, 1e-06)\", `` = \"dgamma(1e-06, 1e-06)\")), prior = FALSE )"},{"path":"https://openpharma.github.io/rbqmR/reference/getModelString.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to obtain the string that defines the default JAGS model for each data type — getModelString","text":"label type model hyperParams named list named vector defines placeholders model string handled. See Usage Notes . prior Boolean. model prior returned. Default: FALSE.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/getModelString.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to obtain the string that defines the default JAGS model for each data type — getModelString","text":"string defining required model","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/getModelString.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage Notes","title":"Function to obtain the string that defines the default JAGS model for each data type — getModelString","text":"hyperParams list, placeholder replacements taken hyperParams[[label]], named vector. Otherwise, placeholder replacements taken hyperParams directly. , hyperParams named vector. named vector obtained hyperParams, names hyperParams define placeholders replacements corresponding values. example, hyperParams value c(\"\"=\"dunif(0, 10)\", \"\"=\"dunif(0, 20)\"), ever found model string, replaced dunif(0, 10). Similarly, occurrences replaced bydunif(0, 20)`. default value hyperParams provides default hyperparameter values used rbqmR's Bayes model fitting functions.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/getModelString.html","id":"usage-notes-1","dir":"Reference","previous_headings":"","what":"Usage notes","title":"Function to obtain the string that defines the default JAGS model for each data type — getModelString","text":"label determined case insensitively","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/getModelString.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to obtain the string that defines the default JAGS model for each data type — getModelString","text":"","code":"#To fit a binary model binModel <- getModelString(\"binary\")"},{"path":"https://openpharma.github.io/rbqmR/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator — %>%","title":"Pipe operator — %>%","text":"See magrittr::%>% details.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator — %>%","text":"","code":"lhs %>% rhs"},{"path":"https://openpharma.github.io/rbqmR/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pipe operator — %>%","text":"lhs value magrittr placeholder. rhs function call using magrittr semantics.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pipe operator — %>%","text":"result calling rhs(lhs).","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/shadeRange.html","id":null,"dir":"Reference","previous_headings":"","what":"Shade Areas Under The Curve — shadeRange","title":"Shade Areas Under The Curve — shadeRange","text":"Given existing ggplot2 object, shade area existing density curve.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/shadeRange.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shade Areas Under The Curve — shadeRange","text":"","code":"shadeRange( plot, range = list(list(lower = NA, upper = 0.1, alpha = 0.3, colour = \"goldenrod1\"), list(lower = 0.9, upper = NA, alpha = 0.3, colour = \"goldenrod1\")), idx = 2 )"},{"path":"https://openpharma.github.io/rbqmR/reference/shadeRange.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shade Areas Under The Curve — shadeRange","text":"plot ggplot2 object range vector (list vectors) containing definition(s) range(s) shaded. See Usage Notes . idx integer defining index within list returned ggplot2::ggpot_build identifies layer containing density shaded. Typically, corresponds order various geoms added ggplot2 object. example, d %>% ggplot2() %>% geom_point(...) %>% geom_density(...), idx 2`.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/shadeRange.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shade Areas Under The Curve — shadeRange","text":"modified ggplot2 object","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/shadeRange.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage Notes","title":"Shade Areas Under The Curve — shadeRange","text":"range list list vectors. list, contain named elements lower, upper, alpha colour, lower upper contain lower upper x axis values define extent shaded area, colour defines colour shaded area alpha defines alpha value defines transparency shading. alpha 0 denotes complete transparency (invisibility). alpha 1 denotes total opacity, meaning contents layers density invisible within shaded area. define shaded ranges include left- right-extents density, set lower upper respectively NA. list lists, element list list elements defined . example, default value range defines ranges shaded lie 10th centile 90th centile density goldenrod1 using alpha 0.3.","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/siteRates.html","id":null,"dir":"Reference","previous_headings":"","what":"A dataset of event rates — siteRates","title":"A dataset of event rates — siteRates","text":"dataset event rates","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/siteRates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A dataset of event rates — siteRates","text":"","code":"siteRates"},{"path":"https://openpharma.github.io/rbqmR/reference/siteRates.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A dataset of event rates — siteRates","text":"tibble 47 rows 6 columns Site site ID Country subject ID Patients number patients site Exposure total exposure site, months Events total number events site Rate site's event rate (events per month)","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/vaLung.html","id":null,"dir":"Reference","previous_headings":"","what":"The Kalbfleisch and Prentice (1980) VA lung dataset. — vaLung","title":"The Kalbfleisch and Prentice (1980) VA lung dataset. — vaLung","text":"@format tibble 137 rows 8 variables: Treatment Treatment group CellType cell type SurvivalTime Survival time since randomisation Status 1=Event, 0=Censored KPS Karnofsky Performance Status Age Age years randomisation PriorTherapy Boolean. received prior therapy? @source Kalbfleisch D Prentice RL (1980), Statistical Analysis Failure Time Data. Wiley, New York","code":""},{"path":"https://openpharma.github.io/rbqmR/reference/vaLung.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Kalbfleisch and Prentice (1980) VA lung dataset. — vaLung","text":"","code":"vaLung"},{"path":"https://openpharma.github.io/rbqmR/reference/vaLung.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"The Kalbfleisch and Prentice (1980) VA lung dataset. — vaLung","text":"object class tbl_df (inherits tbl, data.frame) 228 rows 11 columns.","code":""},{"path":"https://openpharma.github.io/rbqmR/news/index.html","id":"rbqmr-0009002","dir":"Changelog","previous_headings":"","what":"rbqmR 0.0.0.9002","title":"rbqmR 0.0.0.9002","text":"Corrected typos README.md.","code":""},{"path":"https://openpharma.github.io/rbqmR/news/index.html","id":"rbqmr-0009001","dir":"Changelog","previous_headings":"","what":"rbqmR 0.0.0.9001","title":"rbqmR 0.0.0.9001","text":"Added createQtlBubblePlot.","code":""},{"path":"https://openpharma.github.io/rbqmR/news/index.html","id":"rbqmr-0009000","dir":"Changelog","previous_headings":"","what":"rbqmR 0.0.0.9000","title":"rbqmR 0.0.0.9000","text":"Added NEWS.md file track changes package. Replaced logger futile.logger. Improved test coverage.","code":""}]
+[{"path":"https://openpharma.github.io/rbqmR/main/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"John Kirkpatrick. Author, maintainer.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kirkpatrick J (2024). rbqmR: Risk-Based Quality Management R. R package version 0.0.0.9002.","code":"@Manual{, title = {rbqmR: Risk-Based Quality Management in R}, author = {John Kirkpatrick}, year = {2024}, note = {R package version 0.0.0.9002}, }"},{"path":[]},{"path":"https://openpharma.github.io/rbqmR/main/index.html","id":"introduction","dir":"","previous_headings":"","what":"Introduction","title":"Risk-Based Quality Management in R","text":"purpose rbqmR package provide repository r-based tools implementation risk-based quality management. Tools currently exist Dynamic Quality Tolerance Limits (QTLs) using Bayesian Hierarchical Models (ongoing) Observed-Minus-Expected methodology Observed/Expected methodology (ongoing) package work--progress. ’s primary focus dynamic QTLs. methodologies included completeness.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Risk-Based Quality Management in R","text":"can install development version rbqmR GitHub :","code":"# install.packages(\"devtools\") devtools::install_github(\"openpharma/rbqmR\")"},{"path":"https://openpharma.github.io/rbqmR/main/index.html","id":"dynamic-qtls","dir":"","previous_headings":"","what":"Dynamic QTLs","title":"Risk-Based Quality Management in R","text":"use example 2.7 Berry et al (Berry SM 2011), described pages 52 63, modifying context rather meta analysis several different trials, consider data represent performance different sites within single trial. exact metric measured immaterial, though remains summary binomial outcome. central tenet QTL methodology implemented rbqmR current trial behave similar fashion “similar” historical control trial, rather sites within current trial behave similar way. justification assumption trial’s inclusion/exclusion criteria designed minimise heterogeneity amongst study population (save induced differences treatment comparative trials). fit Bayesian Hierarchical Model described Berry et al … … use quantiles posterior distribution probability event define QTLs metric. can done isolation (trial acts control) reference historical data obtained similar previous studies.","code":"data(berrySummary) berrySummary %>% kable(digits = c(0, 0, 0, 2)) fitted <- berrySummary %>% fitBayesBinomialModel(n = Subjects, r = Events) #> Loading required namespace: rjags #> INFO [2024-06-17 07:55:30] Status of model fitting: OK fitted #> $tab #> # A tibble: 20,000 × 4 #> p a b q #> #> 1 0.814 6.46 2.41 76 #> 2 0.854 7.28 2.79 84 #> 3 0.753 6.34 3.09 62 #> 4 0.691 8.96 3.68 49 #> 5 0.690 9.58 3.74 48 #> 6 0.706 8.13 2.52 52 #> 7 0.583 8.45 3.63 27 #> 8 0.624 6.44 3.67 34 #> 9 0.664 3.95 3.65 43 #> 10 0.608 6.91 3.48 31 #> # ℹ 19,990 more rows #> #> $results #> #> JAGS model summary statistics from 20000 samples (chains = 2; adapt+burnin = 5000): #> #> Lower95 Median Upper95 Mean SD Mode MCerr MC%ofSD SSeff #> p[10] 0.36562 0.6991 0.99996 0.68282 0.17257 -- 0.0013713 0.8 15837 #> a 2.2683 5.9563 9.9997 5.9373 2.2751 -- 0.056178 2.5 1640 #> b 0.62627 2.6183 5.1708 2.7753 1.2508 -- 0.031487 2.5 1578 #> #> AC.10 psrf #> p[10] 0.0094542 1 #> a 0.21013 1.0011 #> b 0.22843 1.0003 #> #> Total time taken: 3.9 seconds #> #> #> $status #> [1] \"OK\""},{"path":"https://openpharma.github.io/rbqmR/main/index.html","id":"examples-of-qtl-evaluation-rules","dir":"","previous_headings":"Dynamic QTLs","what":"Examples of QTL evaluation rules","title":"Risk-Based Quality Management in R","text":"using Bayesian Hierarchical Model, probabilities associated credible intervals generally lower associated similar frequentist models. BHMs permit sources variation. , BHM permits variation response rates different sites, even considering overall event rate study. corresponding frequentist analysis assumes sites share common event rate, thus assuming inter-site variation.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/index.html","id":"comparison-to-constant-values","dir":"","previous_headings":"Dynamic QTLs > Examples of QTL evaluation rules","what":"Comparison to constant value(s)","title":"Risk-Based Quality Management in R","text":"evaluatePointEstimateQTL allows comparison arbitrary scalar summary statistic (defaults mean) derived estimate posterior distribution, arbitrary number lower upper limits. example, code defines QTL based mean posterior distribution probability event. Call probability p̂. warning limits 0.5 0.8. action limits 0.4 0.9. evaluateXXXXQTL functions, return value evaluatePointEstimateQTL list. status element indicates whether QTL’s limits breached. qtl element gives calculated value QTL metric data element returns copy data.frame containing site level KRIs augmented column indicating , , various limits breached site. lower upper parameters optional (though least one must given) number limits, labels, arbitrary. one limit defined, can provided scalar, case labelled action. function QTL based specified stat parameter evaluatePointEstimateQTL can user-defined function. example, following code fragments define QTLs based median 10th centile posterior distribution p̂.","code":"berrySummary %>% evaluatePointEstimateQTL( posterior = fitted$tab, metric = p, observedMetric = ObservedResponse, lower = c(\"warn\" = 0.5, \"action\" = 0.4), upper = c(\"warn\" = 0.8, \"action\" = 0.9) ) #> $status #> [1] \"OK\" #> #> $qtl #> [1] 0.6828212 #> #> $data #> # A tibble: 9 × 5 #> Site Subjects Events ObservedResponse Status #> #> 1 1 20 20 1 action #> 2 2 10 4 0.4 warn #> 3 3 16 11 0.688 OK #> 4 4 19 10 0.526 OK #> 5 5 14 5 0.357 warn #> 6 6 46 36 0.783 OK #> 7 7 10 9 0.9 warn #> 8 8 9 7 0.778 OK #> 9 9 6 4 0.667 OK berrySummary %>% evaluatePointEstimateQTL( posterior = fitted$tab, metric = p, observedMetric = ObservedResponse, upper = c(\"mild\" = 0.6, \"moderate\" = 0.8, \"severe\" = 0.9) ) berrySummary %>% evaluatePointEstimateQTL( posterior = fitted$tab, metric = p, stat = median, observedMetric = ObservedResponse, upper = c(\"warn\" = 0.7, \"action\" = 0.9) ) #> $status #> [1] \"OK\" #> #> $qtl #> [1] 0.6991032 #> #> $data #> # A tibble: 9 × 5 #> Site Subjects Events ObservedResponse Status #> #> 1 1 20 20 1 action #> 2 2 10 4 0.4 OK #> 3 3 16 11 0.688 OK #> 4 4 19 10 0.526 OK #> 5 5 14 5 0.357 OK #> 6 6 46 36 0.783 warn #> 7 7 10 9 0.9 warn #> 8 8 9 7 0.778 warn #> 9 9 6 4 0.667 OK berrySummary %>% evaluatePointEstimateQTL( posterior = fitted$tab, metric = p, stat = function(x) quantile(x, probs = 0.1), observedMetric = ObservedResponse, upper = c(\"warn\" = 0.3, \"action\" = 0.8) ) #> $status #> [1] \"warn\" #> #> $qtl #> 10% #> 0.4495861 #> #> $data #> # A tibble: 9 × 5 #> Site Subjects Events ObservedResponse Status #> #> 1 1 20 20 1 action #> 2 2 10 4 0.4 warn #> 3 3 16 11 0.688 warn #> 4 4 19 10 0.526 warn #> 5 5 14 5 0.357 warn #> 6 6 46 36 0.783 warn #> 7 7 10 9 0.9 action #> 8 8 9 7 0.778 warn #> 9 9 6 4 0.667 warn"},{"path":"https://openpharma.github.io/rbqmR/main/index.html","id":"based-on-the-probability-that-the-derived-metric-is-in-a-given-range","dir":"","previous_headings":"Dynamic QTLs > Examples of QTL evaluation rules","what":"Based on the probability that the derived metric is in a given range","title":"Risk-Based Quality Management in R","text":"Suppose previous experience tells us event probability type study 0.50 0.75. define QTL require posterior event probability new participant range 0.5 0.75 inclusive least 60%, warning limit 80%. Individual sites flagged response rate either 40% 85%. , QTL breached, since probability study-level event rate range [0.5, 0.75] 0.46.","code":"qtlProbInRange <- berrySummary %>% evaluateProbabilityInRangeQTL( posterior = fitted$tab, metric = p, observedMetric = ObservedResponse, range = c(0.5, 0.75), probs = c(\"warn\" = 0.8, \"action\" = 0.6), lower = 0.4, upper = 0.85 ) qtlProbInRange #> $status #> [1] \"action\" #> #> $qtl #> [1] 0.46465 #> #> $data #> # A tibble: 9 × 5 #> Site Subjects Events ObservedResponse Status #> #> 1 1 20 20 1 action #> 2 2 10 4 0.4 OK #> 3 3 16 11 0.688 OK #> 4 4 19 10 0.526 OK #> 5 5 14 5 0.357 action #> 6 6 46 36 0.783 OK #> 7 7 10 9 0.9 action #> 8 8 9 7 0.778 OK #> 9 9 6 4 0.667 OK"},{"path":"https://openpharma.github.io/rbqmR/main/index.html","id":"using-an-arbitrary-criterion","dir":"","previous_headings":"Dynamic QTLs > Examples of QTL evaluation rules","what":"Using an arbitrary criterion","title":"Risk-Based Quality Management in R","text":"evaluatePointEstimateQTL, evaluateProbabilityInRangeQTL (evaluateSiteMetricQTL discussed ) wrappers around evaluateCustomQTL, can used evaluate arbitrary, user-defined QTL rule. evaluateCustomQTL takes following parameters: data: tibble containing site-level observed metrics posterior: tibble containing posterior distribution metric, usually obtained fit Bayes model function. f: function whose first two parameters data posterior, ordered names statusCol: column data defines status site. , Status. Uses tidy evaluation. ...: additional parameters passed f. Essentially, evaluateCustomQTL perform basic checks parameter values return value returned data %>% f(posterior, ...). , example, simplified version evaluatePointEstimateQTL compares p̂ 0.6 might ","code":"berrySummary %>% evaluateCustomQTL( posterior = fitted$tab, f = function(data, posterior) { rv <- list() rv$qtl <- posterior %>% summarise(qtl = mean(p)) %>% pull(qtl) rv$status <- ifelse(rv$qtl < 0.6, \"OK\", \"Breach\") rv$data <- data %>% mutate(Status = ifelse(ObservedResponse < 0.6, \"OK\", \"Breach\")) rv } ) #> $qtl #> [1] 0.6828212 #> #> $status #> [1] \"Breach\" #> #> $data #> # A tibble: 9 × 5 #> Site Subjects Events ObservedResponse Status #> #> 1 1 20 20 1 Breach #> 2 2 10 4 0.4 OK #> 3 3 16 11 0.688 Breach #> 4 4 19 10 0.526 OK #> 5 5 14 5 0.357 OK #> 6 6 46 36 0.783 Breach #> 7 7 10 9 0.9 Breach #> 8 8 9 7 0.778 Breach #> 9 9 6 4 0.667 Breach"},{"path":"https://openpharma.github.io/rbqmR/main/index.html","id":"without-historical-data","dir":"","previous_headings":"Dynamic QTLs","what":"Without historical data","title":"Risk-Based Quality Management in R","text":"Especially early development new compound, project teams often say idea values various metrics used define QTLs might . conventionally defined QTLs can problem: inappropriately chosen QTL might lead breach , reality, issue. Basing QTL centiles posterior distribution metric obtained QTL model just fitted, recalling purpose inclusion/exclusion criteria minimise heterogeneity, can avoid problem. evaluateSiteMetricQTL function calculates thresholds (example warning action limits) translating quantiles posterior distribution metric real-life scale metric measured. , use Berry data example. quantiles element return value contains mappings quantile posterior observed values metric. example, first row rvSiteMetrics$quantiles shows lower action limit 5th centile posterior, corresponds event probability 0.366. , data element list contains copy site metric dataset, augmented column (named Status default) allocates observed site-level metrics (KRIs) band defined thresholds lower upper. NB rvSiteMetrics$data contains incorrect values Status column. See issue #12. qtl element return value contains counts sites threshold name. Finally, status returned QTL \"OK\" default. However, evaluateSiteMetricQTL can passed function can apply arbitrary rule determine whether breach occurred. example , function’s argument qtl element evaluateSiteMetricQTL’s return value. example, given nine sites fictitious example calculated 90% posterior credible interval, ’s reasonable expect one site lie outside range. might say QTL breach occurred two sites lie outside credible interval:","code":"rvSiteMetrics <- berrySummary %>% evaluateSiteMetricQTL( posterior = fitted$tab, metric = p, observedMetric = ObservedResponse, lower = c(\"action\" = 0.05, \"warn\" = 0.2), upper = c(\"action\" = 0.95, \"warn\" = 0.8) ) rvSiteMetrics$quantiles #> # A tibble: 4 × 4 #> Threshold Status Quantile p #> #> 1 Lower action 0.05 0.366 #> 2 Lower warn 0.2 0.543 #> 3 Upper warn 0.8 0.838 #> 4 Upper action 0.95 0.933 rvSiteMetrics$data #> # A tibble: 9 × 5 #> Site Subjects Events ObservedResponse Status #> #> 1 1 20 20 1 warn #> 2 2 10 4 0.4 warn #> 3 3 16 11 0.688 OK #> 4 4 19 10 0.526 warn #> 5 5 14 5 0.357 action #> 6 6 46 36 0.783 OK #> 7 7 10 9 0.9 warn #> 8 8 9 7 0.778 OK #> 9 9 6 4 0.667 OK rvSiteMetrics$qtl #> # A tibble: 3 × 2 #> Status N #> #> 1 OK 4 #> 2 action 1 #> 3 warn 4 rvSiteMetrics$status #> [1] \"OK\" (berrySummary %>% evaluateSiteMetricQTL( posterior = fitted$tab, metric = p, observedMetric = ObservedResponse, lower = c(\"action\" = 0.5, \"warn\" = 0.6), upper = c(\"action\" = 0.9, \"warn\" = 0.8), statusFunc = function(d) { ifelse( d %>% dplyr::filter(Status == \"action\") %>% dplyr::pull(N) >= 2, \"action\", \"OK\" ) } ))$status #> [1] \"action\""},{"path":"https://openpharma.github.io/rbqmR/main/index.html","id":"representing-the-evaluation-of-a-qtl-graphically","dir":"","previous_headings":"","what":"Representing the evaluation of a QTL graphically","title":"Risk-Based Quality Management in R","text":"Take, example, QTL requires study level metric lie within given range, illustrated . site-level KRIs can added plot help focus attention intervention likely largest effect.","code":"fitted$tab %>% createQtlPlot( targetRange = list(\"lower\" = 0.5, \"upper\" = 0.75), observedMetric = fitted$tab %>% summarise(Mean = mean(p)) %>% pull(Mean) ) fitted$tab %>% createQtlPlot( targetRange = list(\"lower\" = 0.5, \"upper\" = 0.75), observedMetric = fitted$tab %>% summarise(Mean = mean(p)) %>% pull(Mean), actionLimits = list( list( \"lower\" = rvSiteMetrics$quantiles %>% filter(Threshold == \"Upper\", Status == \"action\") %>% pull(p), \"upper\" = NA, \"alpha\" = 0.3, \"colour\" = \"goldenrod1\" ), list( \"lower\" = NA, \"upper\" = rvSiteMetrics$quantiles %>% filter(Threshold == \"Lower\", Status == \"action\") %>% pull(p), \"alpha\" = 0.3, \"colour\" = \"goldenrod1\" ) ), siteData = berrySummary, siteSize = Subjects, siteMetric = ObservedResponse )"},{"path":"https://openpharma.github.io/rbqmR/main/index.html","id":"presenting-kris","dir":"","previous_headings":"","what":"Presenting KRIs","title":"Risk-Based Quality Management in R","text":"KRIs associated QTL can presented graphically. rmqmR includes createQtlBubblePlot function, presents KRIs (possibly multiple evaluations QTL) form bubble plot overlaid box--whisker plot. Site-level data may grouped arbitrary fashion, . Optionally, reference lines correspond QTL thresholds may added.","code":"berrySummary %>% add_column(Snapshot = \"End of study\") %>% add_column(Location = c(rep(\"EU\", 4), rep(\"US\", 5))) %>% createQtlBubblePlot( x = Snapshot, y = ObservedResponse, size = Subjects, group = Location, boxWidth = 0.1, limits = list( list( label = \"QTL (85%)\", colour = \"red\", type = \"dashed\", y = 0.85, x = 1.25, vjust = -1 ), list( label = \"Sec Lim (75%)\", colour = \"goldenrod\", type = \"dotted\", y = 0.75, x = 1.25, vjust = 1.25 ) ) ) #> Warning: The following aesthetics were dropped during statistical transformation: size #> ℹ This can happen when ggplot fails to infer the correct grouping structure in #> the data. #> ℹ Did you forget to specify a `group` aesthetic or to convert a numerical #> variable into a factor?"},{"path":"https://openpharma.github.io/rbqmR/main/index.html","id":"observed---expected-methodology","dir":"","previous_headings":"","what":"Observed - Expected Methodology","title":"Risk-Based Quality Management in R","text":"generate random data similar used (Gilbert 2020), setting seed reproducibility. order illustrate happens QTL breached, set probability participant reports event 0.13, even though QTL process assume event rate 0.10… … create observed-expected table … … plot corresponding graph. can see trial breached warning limit. first happen? First breach action warning limit Warning Limits","code":"set.seed(011327) randomData <- tibble( Subject = 1:400, Event = rbinom(400, 1, 0.13) ) omeTable <- randomData %>% createObservedMinusExpectedTable( timeVar = Subject, eventVar = Event, eventArray = 1, expectedRate = 0.1, maxTrialSize = 400 ) omeTable %>% createObservedMinusExpectedPlot() omeTable %>% filter(Status != \"OK\") %>% head(1) %>% select(-contains(\"Action\"), -SubjectIndex) %>% kable( col.names = c(\"Subject\", \"Event\", \"Cumulative Events\", \"O - E\", \"Status\", \"Lower\", \"Upper\"), caption = \"First breach of an action or warning limit\" ) %>% add_header_above(c(\" \" = 5, \"Warning Limits\" = 2))"},{"path":"https://openpharma.github.io/rbqmR/main/index.html","id":"observed--expected-methodology","dir":"","previous_headings":"","what":"Observed / Expected methodology","title":"Risk-Based Quality Management in R","text":"Katz et al (Katz D 1978) calculate confidence interval ratio two binomial random variables. use determine QTLs ratio observed expected proportions. variability associated ratio suggests methodology likely useful large studies low expected event rates. require historical trial data implement methodology. Suppose data 10,000 historical patients reported given event rate 1.4%. planning 1500 patient trial reason suppose event rate trial different seen past. trial executed, observed data can added table plot. TODO Need check interpretation parameters","code":"createObservedOverExpectedTable( nHistorical = 10000, historicalRate = 0.014, expectedRate = 0.014, nObservedRange = seq(50, 1500, 25) ) %>% createObservedOverExpectedPlot() observedData <- tibble( NObserved = c(250, 500, 750, 1000), ObservedRate = 100 * c(2, 9, 15, 16) / NObserved ) createObservedOverExpectedTable( nHistorical = 10000, historicalRate = 0.014, expectedRate = 0.014, nObservedRange = seq(50, 1500, 25), observedData = observedData, observedRate = ObservedRate ) %>% createObservedOverExpectedPlot(observedRate = ObservedRate)"},{"path":"https://openpharma.github.io/rbqmR/main/index.html","id":"beyond-transcelerate","dir":"","previous_headings":"","what":"Beyond TransCelerate","title":"Risk-Based Quality Management in R","text":"time writing (late 2022) TransCelerate Quality Tolerance Limit Framework (Transcelerate 2020) lists metrics exclusively binary nature. many potential metrics non-binary may provide insight conduct trial. example, number episodes rescue medication (opposed percentage number trial participants rescue medication) Time withdrawal consent (opposed percentage number trial participants withdrawal informed consent) well metrics can’t easily dichotomised Drug plasma levels Number (S)AEs reported per time unit drug exposure Time respond data queries Bayesian QTL framework implemented rbqmR can easily extended include data types.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/index.html","id":"events-per-unit-time","dir":"","previous_headings":"","what":"Events per unit time","title":"Risk-Based Quality Management in R","text":"use data numbers Prussian cavalry officers kicked death horses (Bortkiewicz 1898) illustrate method. Regard different cavalry Corps “sites” regard number years data collected “exposure”. Although necessary , data Corps recorded amount time, Poisson model used rbqmR adjusts risk total exposure site. Fitting model straightforward.","code":"data(\"cavalryDeaths\") cavalryDeaths #> # A tibble: 280 × 3 #> Year Corps Deaths #> #> 1 1875 Guards 0 #> 2 1875 Corps 1 0 #> 3 1875 Corps 2 0 #> 4 1875 Corps 3 0 #> 5 1875 Corps 4 0 #> 6 1875 Corps 5 0 #> 7 1875 Corps 6 0 #> 8 1875 Corps 7 1 #> 9 1875 Corps 8 1 #> 10 1875 Corps 9 0 #> # ℹ 270 more rows cavalrySummary <- cavalryDeaths %>% group_by(Corps) %>% summarise( Deaths = sum(Deaths), TotalTime = n(), .groups = \"drop\" ) %>% mutate(DeathRate = Deaths / TotalTime) cavalrySummary #> # A tibble: 14 × 4 #> Corps Deaths TotalTime DeathRate #> #> 1 Guards 16 20 0.8 #> 2 Corps 1 16 20 0.8 #> 3 Corps 2 12 20 0.6 #> 4 Corps 3 12 20 0.6 #> 5 Corps 4 8 20 0.4 #> 6 Corps 5 11 20 0.55 #> 7 Corps 6 17 20 0.85 #> 8 Corps 7 12 20 0.6 #> 9 Corps 8 7 20 0.35 #> 10 Corps 9 13 20 0.65 #> 11 Corps 10 15 20 0.75 #> 12 Corps 11 25 20 1.25 #> 13 Corps 14 24 20 1.2 #> 14 Corps 15 8 20 0.4 getModelString(\"poisson\") #> model { #> for (i in 1:k) { #> #> events[i] ~ dpois(mu[i]) #> mu[i] <- lambda[i]*exposure[i] #> #> lambda[i] ~ dgamma(shape, 1/scale) #> } #> scale ~ dgamma(1, 1) #> shape ~ dgamma(1, 1) #> } poissonFit <- cavalrySummary %>% fitBayesPoissonModel(Deaths, TotalTime) #> INFO [2024-06-17 07:55:41] Status of model fitting: OK poissonFit$tab %>% createQtlPlot( metric = lambda, siteData = cavalrySummary, siteSize = TotalTime, siteMetric = DeathRate ) + labs(x = \"Deaths per year\")"},{"path":"https://openpharma.github.io/rbqmR/main/index.html","id":"environment","dir":"","previous_headings":"","what":"Environment","title":"Risk-Based Quality Management in R","text":"","code":"sessionInfo() #> R version 4.3.1 (2023-06-16) #> Platform: x86_64-pc-linux-gnu (64-bit) #> Running under: Ubuntu 22.04.3 LTS #> #> Matrix products: default #> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 #> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 #> #> locale: #> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C #> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 #> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 #> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C #> [9] LC_ADDRESS=C LC_TELEPHONE=C #> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C #> #> time zone: Etc/UTC #> tzcode source: system (glibc) #> #> attached base packages: #> [1] stats graphics grDevices utils datasets methods base #> #> other attached packages: #> [1] rbqmR_0.0.0.9002 testthat_3.2.0 lubridate_1.9.3 forcats_1.0.0 #> [5] stringr_1.5.0 dplyr_1.1.3 purrr_1.0.2 readr_2.1.4 #> [9] tidyr_1.3.0 tibble_3.2.1 ggplot2_3.4.3 tidyverse_2.0.0 #> [13] kableExtra_1.3.4 magrittr_2.0.3 #> #> loaded via a namespace (and not attached): #> [1] tidyselect_1.2.0 viridisLite_0.4.2 farver_2.1.1 #> [4] rjags_4-14 fastmap_1.1.1 promises_1.2.1 #> [7] digest_0.6.33 timechange_0.2.0 mime_0.12 #> [10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 #> [13] compiler_4.3.1 rlang_1.1.1 tools_4.3.1 #> [16] utf8_1.2.3 yaml_2.3.7 knitr_1.44 #> [19] lambda.r_1.2.4 labeling_0.4.3 prettyunits_1.2.0 #> [22] htmlwidgets_1.6.2 pkgbuild_1.4.2 xml2_1.3.5 #> [25] pkgload_1.3.3 miniUI_0.1.1.1 withr_2.5.1 #> [28] desc_1.4.2 grid_4.3.1 fansi_1.0.5 #> [31] urlchecker_1.0.1 profvis_0.3.8 toOrdinal_1.3-0.0 #> [34] xtable_1.8-4 colorspace_2.1-0 scales_1.2.1 #> [37] cli_3.6.1 rmarkdown_2.25 crayon_1.5.2 #> [40] generics_0.1.3 remotes_2.4.2.1 rstudioapi_0.15.0 #> [43] httr_1.4.7 tzdb_0.4.0 sessioninfo_1.2.2 #> [46] cachem_1.0.8 rvest_1.0.3 parallel_4.3.1 #> [49] formatR_1.14 vctrs_0.6.3 devtools_2.4.5 #> [52] webshot_0.5.5 callr_3.7.3 hms_1.1.3 #> [55] systemfonts_1.0.5 glue_1.6.2 ps_1.7.5 #> [58] stringi_1.7.12 gtable_0.3.4 futile.logger_1.4.3 #> [61] later_1.3.1 munsell_0.5.0 pillar_1.9.0 #> [64] brio_1.1.3 htmltools_0.5.6.1 R6_2.5.1 #> [67] rprojroot_2.0.3 evaluate_0.22 shiny_1.7.5 #> [70] lattice_0.21-9 highr_0.10 futile.options_1.0.1 #> [73] memoise_2.0.1 httpuv_1.6.11 Rcpp_1.0.11 #> [76] svglite_2.1.1 coda_0.19-4 xfun_0.40 #> [79] fs_1.6.3 usethis_2.2.2 runjags_2.2.2-1.1 #> [82] pkgconfig_2.0.3"},{"path":[]},{"path":"https://openpharma.github.io/rbqmR/main/reference/applyQtl.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter a Tibble to Obtain Values Outside a QTL — applyQtl","title":"Filter a Tibble to Obtain Values Outside a QTL — applyQtl","text":"Given input tibble column, filter tibble retain rows value column lies outside range given upper lower limits, optional.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/applyQtl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter a Tibble to Obtain Values Outside a QTL — applyQtl","text":"","code":"applyQtl(data, var, lower = NULL, upper = NULL)"},{"path":"https://openpharma.github.io/rbqmR/main/reference/applyQtl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter a Tibble to Obtain Values Outside a QTL — applyQtl","text":"data input tibble var name column filter. Uses NSE. lower lower limit. May NULL. upper upper limit. May NULL.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/applyQtl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter a Tibble to Obtain Values Outside a QTL — applyQtl","text":"filtered tibble","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/berrySubject.html","id":null,"dir":"Reference","previous_headings":"","what":"Data derived and adapted from Berry et al (2011) pp 52-63 — berrySubject","title":"Data derived and adapted from Berry et al (2011) pp 52-63 — berrySubject","text":"dataset subject event flags","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/berrySubject.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data derived and adapted from Berry et al (2011) pp 52-63 — berrySubject","text":"","code":"berrySubject"},{"path":"https://openpharma.github.io/rbqmR/main/reference/berrySubject.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Data derived and adapted from Berry et al (2011) pp 52-63 — berrySubject","text":"tibble 150 rows 3 columns Site site ID SubjectID subject ID Event Whether subject experienced event","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/berrySummary.html","id":null,"dir":"Reference","previous_headings":"","what":"Data adapted from Berry et al (2011) pp 52-63 — berrySummary","title":"Data adapted from Berry et al (2011) pp 52-63 — berrySummary","text":"dataset subject event counts site","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/berrySummary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data adapted from Berry et al (2011) pp 52-63 — berrySummary","text":"","code":"berrySummary"},{"path":"https://openpharma.github.io/rbqmR/main/reference/berrySummary.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Data adapted from Berry et al (2011) pp 52-63 — berrySummary","text":"tibble 9 rows 4 columns Site site ID Subjects number subjects site Events number subjects ith least one event site ObservedResponse observed response rate Events/Subjects site","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/cavalryDeaths.html","id":null,"dir":"Reference","previous_headings":"","what":"The Bortkiewicz cavalry dataset — cavalryDeaths","title":"The Bortkiewicz cavalry dataset — cavalryDeaths","text":"dataset number Prussian cavalry soldiers kicked death horses","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/cavalryDeaths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Bortkiewicz cavalry dataset — cavalryDeaths","text":"","code":"cavalryDeaths"},{"path":"https://openpharma.github.io/rbqmR/main/reference/cavalryDeaths.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"The Bortkiewicz cavalry dataset — cavalryDeaths","text":"tibble 280 rows 3 variables: Corps corps Year year Deaths number deaths given corps given year","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/cavalryDeaths.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"The Bortkiewicz cavalry dataset — cavalryDeaths","text":"https://archive.org/details/dasgesetzderklei00bortrich","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/createObservedMinusExpectedPlot.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an Observed Minus Expected Plot — createObservedMinusExpectedPlot","title":"Create an Observed Minus Expected Plot — createObservedMinusExpectedPlot","text":"Given input data.frame, create corresponding observed-expected plot option upper lower warning limits optional upper lower action limits","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/createObservedMinusExpectedPlot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an Observed Minus Expected Plot — createObservedMinusExpectedPlot","text":"","code":"createObservedMinusExpectedPlot( data, indexVar = SubjectIndex, upperActionLimit = UpperActionLimit, lowerActionLimit = LowerActionLimit, upperWarningLimit = UpperWarningLimit, lowerWarningLimit = LowerWarningLimit, warningQuantiles = c(lower = 0.01, upper = 0.99), permittedRates = c(lower = 0.05, upper = 0.15) )"},{"path":"https://openpharma.github.io/rbqmR/main/reference/createObservedMinusExpectedPlot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an Observed Minus Expected Plot — createObservedMinusExpectedPlot","text":"data input data.frame indexVar column data defines sequence participants enrolled. integer vector values 1 n, n number participants enrolled. upperActionLimit column data defines upper action limit. NULL, upper action limit omitted plot. lowerActionLimit column data defines lower action limit. NULL, lower action limit omitted plot. upperWarningLimit column data defines upper warning limit. NULL, upper warning limit omitted plot. lowerWarningLimit column data defines lower warning limit. NULL, lower warning limit omitted plot. warningQuantiles named numeric vector elements upper lower containing quantiles binomial distribution define warning limits. Used labelling. NULL, corresponding footer omitted plot. Individual elements may NA. permittedRates named numeric vector elements upper lower containing observed event rates define action limits. Used labelling. NULL, corresponding footer omitted plot. Individual elements may NA.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/createObservedMinusExpectedTable.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a data.frame containing the results of an Observed - Expected Analysis — createObservedMinusExpectedTable","title":"Create a data.frame containing the results of an Observed - Expected Analysis — createObservedMinusExpectedTable","text":"Create data.frame containing results Observed - Expected Analysis","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/createObservedMinusExpectedTable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a data.frame containing the results of an Observed - Expected Analysis — createObservedMinusExpectedTable","text":"","code":"createObservedMinusExpectedTable( data, timeVar, eventVar, eventArray, expectedRate, cumulativeVar = CumulativeEvents, observedMinusExpectedVar = ObservedMinusExpected, indexVar = SubjectIndex, statusVar = Status, maxTrialSize = NA, upperActionLimit = UpperActionLimit, lowerActionLimit = LowerActionLimit, upperWarningLimit = UpperWarningLimit, lowerWarningLimit = LowerWarningLimit, warningQuantiles = c(lower = 0.01, upper = 0.99), permittedRates = c(lower = 0.05, upper = 0.15) )"},{"path":"https://openpharma.github.io/rbqmR/main/reference/createObservedMinusExpectedTable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a data.frame containing the results of an Observed - Expected Analysis — createObservedMinusExpectedTable","text":"data input data.frame. Required. timeVar column data defines order participants enrolled. Required. eventVar column data defines whether participant experienced event. Required. eventArray array defining values eventVar indicate corresponding participant experienced event. Required. expectedRate scalar defines participant-level event rate expected. Required. cumulativeVar name column output data.frame contains cumulative sum events. Uses tidy evaluation. observedMinusExpectedVar name column output data.frame contains calculated observed - expected statistic participant. Uses tidy evaluation. indexVar name column output data.frame contains index participant's enrolment: integer 1 n n number participants enrolled. Uses tidy evaluation. statusVar name column output data.frame contains status trial: either OK, WARN BREECH maxTrialSize scalar integer defining maximum possible size trial. Can NULL. upperActionLimit name column output data.frame contains upper action limit participant. Uses tidy evaluation. lowerActionLimit name column output data.frame contains lower action limit participant. Uses tidy evaluation. upperWarningLimit name column output data.frame contains upper warning limit participant. Uses tidy evaluation. lowerWarningLimit name column output data.frame contains lower warning limit participant. Uses tidy evaluation. warningQuantiles named numeric vector length 2 elements lower upper define quantiles binomial distribution define warning limits. Individual elements may NA. NULL, lowerWarningLimit upperWarningLimit ignored corresponding columns added output data.frame permittedRates named numeric vector length 2 elements lower upper define observed event rates define action limits. Individual elements may NA. NULL, lowerActionLimit upperActionLimit ignored corresponding columns added output data.frame","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/createObservedOverExpectedPlot.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an Observed Over Expected Plot — createObservedOverExpectedPlot","title":"Create an Observed Over Expected Plot — createObservedOverExpectedPlot","text":"Given tibble created createObservedOverExpectedTable create observed expected plot.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/createObservedOverExpectedPlot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an Observed Over Expected Plot — createObservedOverExpectedPlot","text":"","code":"createObservedOverExpectedPlot( data, n = NObserved, observedRate = NULL, alpha = 0.05, sides = c(\"two\", \"lower\", \"upper\") )"},{"path":"https://openpharma.github.io/rbqmR/main/reference/createObservedOverExpectedPlot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an Observed Over Expected Plot — createObservedOverExpectedPlot","text":"data tibble containing calculated limits n column data defines sample size corresponding limit(s) relate(s) observedRate column data defines observed rate. May NULL. alpha Type 1 error rate associated calculated limits. Default 0.05 sides sidedness alpha. Either two, upper lower. Default two.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/createObservedOverExpectedPlot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an Observed Over Expected Plot — createObservedOverExpectedPlot","text":"ggplot2 object containing requested plot","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/createObservedOverExpectedTable.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an Observed Over Expected Grid Using the work of Katz et al (1978) calculate acceptable limits for the ratio of two binomial proportions. The Type 1 error rate can be specified, and the limits can be one- or two-sided. — createObservedOverExpectedTable","title":"Create an Observed Over Expected Grid Using the work of Katz et al (1978) calculate acceptable limits for the ratio of two binomial proportions. The Type 1 error rate can be specified, and the limits can be one- or two-sided. — createObservedOverExpectedTable","text":"Create Observed Expected Grid Using work Katz et al (1978) calculate acceptable limits ratio two binomial proportions. Type 1 error rate can specified, limits can one- two-sided.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/createObservedOverExpectedTable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an Observed Over Expected Grid Using the work of Katz et al (1978) calculate acceptable limits for the ratio of two binomial proportions. The Type 1 error rate can be specified, and the limits can be one- or two-sided. — createObservedOverExpectedTable","text":"","code":"createObservedOverExpectedTable( observedData = NULL, observedRate = NULL, n = NObserved, nHistorical, nObservedRange = seq(50, 1500, 25), expectedRate, historicalRate, alpha = 0.05, sides = c(\"two\", \"lower\", \"upper\") )"},{"path":"https://openpharma.github.io/rbqmR/main/reference/createObservedOverExpectedTable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an Observed Over Expected Grid Using the work of Katz et al (1978) calculate acceptable limits for the ratio of two binomial proportions. The Type 1 error rate can be specified, and the limits can be one- or two-sided. — createObservedOverExpectedTable","text":"observedData tibble containing observed data compared calculated limit(s). May NULL. observedRate column observedData contains observed rates. Ignored observedData NULL. Uses tidy evaluation. n column observedData (NULL) output tibble defines sample size corresponding limit(s) relate(s). nHistorical number observations historical rate based nObservedRange sequence values limits calculated expectedRate event rate expected current study. Usually historicalRate, need . historicalRate event rate observed historical data alpha Type 1 error rate associated calculated limits. Default 0.05 sides sidedness alpha. Either two, upper lower. Default two.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/createObservedOverExpectedTable.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an Observed Over Expected Grid Using the work of Katz et al (1978) calculate acceptable limits for the ratio of two binomial proportions. The Type 1 error rate can be specified, and the limits can be one- or two-sided. — createObservedOverExpectedTable","text":"tibble","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/createQtlBubblePlot.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a QTL bubble plot — createQtlBubblePlot","title":"Create a QTL bubble plot — createQtlBubblePlot","text":"Create QTL bubble plot","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/createQtlBubblePlot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a QTL bubble plot — createQtlBubblePlot","text":"","code":"createQtlBubblePlot( d, x, y, size, group = NULL, limits = NULL, summarise = FALSE, summarize = summarise, stat = NULL, jitterHeight = 0, jitterWidth = NULL, showBox = TRUE, boxFill = \"steelblue2\", boxColour = boxFill, boxColor = boxColour, boxAlpha = 0.25, boxWidth = 0.5, showLegend = TRUE, ... )"},{"path":"https://openpharma.github.io/rbqmR/main/reference/createQtlBubblePlot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a QTL bubble plot — createQtlBubblePlot","text":"d data frame containing data plotted x column data appear x-axis y column data appear y-axis size column data defines size bubbles group Default: NULL column data defines fill colour bubbles limits Default: NULL list defining characteristics horizontal reference lines appear plot. See Usage notes . summarise Default: FALSE input data frame summarised derive plotted statistics? See Usage notes summarize Default: summarise US English equivalent summarise stat Default: NULL summary function used summarise data. NULL summarise TRUE. See Usage notes jitterHeight Default: 0. Value height parameter call geom_jitter. default value implies vertical jittering. jitterWidth Default: NULL. Value width parameter call geom_jitter. default value implies 40% horizontal jitter. showBox Default: TRUE show unjittered box--whisker plot value x?. boxFill Default: \"steelblue2\": colour box--whisker plot filled boxColour Default: boxFill: colour outline box--whisker plot drawn boxColor Default: boxColour: US-English version boxColour boxAlpha Default: 0.25 transparency box--whisker plot. alpha=0, box invisible. alpha=1, box totally opaque. boxWidth Default: 0.5 width box box--whisker plot, units used x-axis showLegend Default: TRUE legend defined group appear plot ... additional parameters passed ggplot2 functions stat","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/createQtlBubblePlot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a QTL bubble plot — createQtlBubblePlot","text":"gg object","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/createQtlBubblePlot.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage notes","title":"Create a QTL bubble plot — createQtlBubblePlot","text":"limits list lists, element defines label (default \"\"), colour (default \"black\"), line type (default \"solid\"), y co-ordinate (default 1), x co-ordinate (default 0), vertical offset (vjust) (default -1) reference line. element component lists missing, warning issued default value supplied. example: limits=list(list(label=\"QTL (12%)\", colour=\"red\", type=\"dashed\", y=12, x=1.5, vjust=-1),list(label=\"Sec Lim (8%)\", colour=\"goldenrod\", type=\"dotted\", y=58, x=1.25, vjust=-1)) summarise TRUE, (participant-level) information data summarised plot created. data grouped group x y=stat(y) size=sum(size) calculated, x, y, size stat parameters defined .","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/createQtlPlot.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary Plot of Observed Event Rates/Proportions — createQtlPlot","title":"Summary Plot of Observed Event Rates/Proportions — createQtlPlot","text":"Summary Plot Observed Event Rates/Proportions","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/createQtlPlot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary Plot of Observed Event Rates/Proportions — createQtlPlot","text":"","code":"createQtlPlot( data, metric = p, siteData = NULL, targetRange = NULL, actionLimits = NULL, warningLimits = NULL, observedMetric = NULL, siteSize = NULL, siteMetric = NULL )"},{"path":"https://openpharma.github.io/rbqmR/main/reference/createQtlPlot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary Plot of Observed Event Rates/Proportions — createQtlPlot","text":"data tibble containing MCMC samples density required metric column data contains sampled values metric evaluated siteData tibble containing observed site specific data targetRange tibble containing lower upper limits target range metric actionLimits list named vector defining action limits appear graph. See [shadeRange] details. May NA NULL. warningLimits list named vector defining action limits appear graph. See [shadeRange] details. May NA NULL. observedMetric observed value metric siteSize column siteData defines sample size site. Uses tidyselect. Ignored siteData NULL siteMetric column siteData defines KRI site. Uses tidyselect. Ignored siteData NULL.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-assertColumnDoesNotExist.html","id":null,"dir":"Reference","previous_headings":"","what":"Throw an exception of the given column DOES exist in the given data.frame — .assertColumnDoesNotExist","title":"Throw an exception of the given column DOES exist in the given data.frame — .assertColumnDoesNotExist","text":"Throw exception given column exist given data.frame","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-assertColumnDoesNotExist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Throw an exception of the given column DOES exist in the given data.frame — .assertColumnDoesNotExist","text":"","code":".assertColumnDoesNotExist(data, col)"},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-assertColumnDoesNotExist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Throw an exception of the given column DOES exist in the given data.frame — .assertColumnDoesNotExist","text":"data data.frame searched col name column searched","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-assertColumnDoesNotExist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Throw an exception of the given column DOES exist in the given data.frame — .assertColumnDoesNotExist","text":"NULL","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-assertColumnDoesNotExist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Throw an exception of the given column DOES exist in the given data.frame — .assertColumnDoesNotExist","text":"","code":"# tibble::tibble(good=1) %>% .assertColumnExists(good) # No exception # tibble::tibble(good=1) %>% .assertColumnExists(bad) # Exception"},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-assertColumnExists.html","id":null,"dir":"Reference","previous_headings":"","what":"Throw an exception of the given column DOES NOT exist in the given data.frame — .assertColumnExists","title":"Throw an exception of the given column DOES NOT exist in the given data.frame — .assertColumnExists","text":"Throw exception given column exist given data.frame","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-assertColumnExists.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Throw an exception of the given column DOES NOT exist in the given data.frame — .assertColumnExists","text":"","code":".assertColumnExists(data, col)"},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-assertColumnExists.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Throw an exception of the given column DOES NOT exist in the given data.frame — .assertColumnExists","text":"data data.frame searched col name column searched","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-assertColumnExists.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Throw an exception of the given column DOES NOT exist in the given data.frame — .assertColumnExists","text":"NULL","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-assertColumnExists.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Throw an exception of the given column DOES NOT exist in the given data.frame — .assertColumnExists","text":"","code":"# tibble::tibble(good=1) %>% .assertColumnExists(good) # No exception # tibble::tibble(good=1) %>% .assertColumnExists(bad) # Exception"},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-autorunJagsAndCaptureOutput.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit an MCMC model to a dataset, capture and log JAGS messages — .autorunJagsAndCaptureOutput","title":"Fit an MCMC model to a dataset, capture and log JAGS messages — .autorunJagsAndCaptureOutput","text":"Fit MCMC model dataset, capture log JAGS messages","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-autorunJagsAndCaptureOutput.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit an MCMC model to a dataset, capture and log JAGS messages — .autorunJagsAndCaptureOutput","text":"","code":".autorunJagsAndCaptureOutput( data, modelString, monitor, inits = NULL, returnClass = \"binomialModel\", max.time = 600, ... )"},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-autorunJagsAndCaptureOutput.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit an MCMC model to a dataset, capture and log JAGS messages — .autorunJagsAndCaptureOutput","text":"data JAGS data list modelString JAGS model string monitor vector names parameters monitor inits inits used JAGS model returnClass class prepend class tab element returned value max.time maximum time allowed model fitting, ... parameters passed autorun.jags","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-columnExists.html","id":null,"dir":"Reference","previous_headings":"","what":"Determine if a column, passed using NSE, exists in a data.frame — .columnExists","title":"Determine if a column, passed using NSE, exists in a data.frame — .columnExists","text":"Determine column, passed using NSE, exists data.frame","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-columnExists.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Determine if a column, passed using NSE, exists in a data.frame — .columnExists","text":"","code":".columnExists(data, col)"},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-columnExists.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Determine if a column, passed using NSE, exists in a data.frame — .columnExists","text":"data data.frame searched col name column searched","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-columnExists.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Determine if a column, passed using NSE, exists in a data.frame — .columnExists","text":"TRUE column exists, FALSE otherwise","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-columnExists.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Determine if a column, passed using NSE, exists in a data.frame — .columnExists","text":"","code":"# tibble::tibble(good=1) %>% .columnExists(good) # TRUE # tibble::tibble(good=1) %>% .columnExists(bad) # FALSE"},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-createBinomialInit.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createBinomialInit","title":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createBinomialInit","text":"Initial values p chosen uniformly random range 0.001 0.999 inclusive.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-createBinomialInit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createBinomialInit","text":"","code":".createBinomialInit( gammaA = c(shape = 1, scale = 10), gammaB = c(shape = 1, scale = 10), seed = NULL, quantiles = NULL, rng = c(\"base::Mersenne-Twister\", \"base::Wichmann-Hill\", \"base::Marsaglia-Multicarry\", \"base::Super-Duper\"), n = 1 )"},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-createBinomialInit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createBinomialInit","text":"gammaA vector elements named shape scale define hyper prior Beta prior p. gammaB vector elements named shape scale define hyper prior b Beta prior p. seed scalar containing seed used init. NULL, default, indicates random seed used. clear runjags JAGS manuals range permissible seed values , positive integers appear acceptable. quantiles Default NULL. NULL, starting values b chosen random. Otherwise, starting values defined values supplied quantiles. See Usage Notes . rng random number generator used init n length initialisation vector p","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-createBinomialInit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createBinomialInit","text":"init: list elements named p, , b, RNG.name RNG.seed.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-createBinomialInit.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage Notes","title":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createBinomialInit","text":"quantiles parameter provides flexible way defining starting values hyperparameters b. NULL, default, starting values random values either gammaA () gammaB (b). Otherwise, quantiles numeric vector length 2 values (named b) either NA range (0, 1). NA, corresponding staring value chosen random, . Otherwise, value x, starting value hyperparameter xth quantile corresponding Gamma distribution. example, quantiles=c(\"\"=NA, \"b\"=50), starting value random value drawn distribution defined gammaA starting value b 50th centile distribution defined gammaB.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-createPoissonInit.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createPoissonInit","title":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createPoissonInit","text":"Create JAGS inits suitable use run.jags autorun.jags","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-createPoissonInit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createPoissonInit","text":"","code":".createPoissonInit( gammaShape = c(shape = 1, scale = 10), gammaScale = c(shape = 1, scale = 10), seed = NULL, quantiles = NULL, rng = c(\"base::Mersenne-Twister\", \"base::Wichmann-Hill\", \"base::Marsaglia-Multicarry\", \"base::Super-Duper\"), n = 1 )"},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-createPoissonInit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a JAGS inits suitable for use with run.jags and autorun.jags — .createPoissonInit","text":"gammaShape named vector defining shape scale parameters gamma hyperprior shape parameter gammaScale named vector defining shape scale parameters gamma hyperprior scale parameter seed seed use generating random seeds MCMC processes quantiles Default NULL. NULL, starting values b chosen random. Otherwise, starting values defined values supplied quantiles. See Usage Notes . rng random number generator used init n length initialisation vector lambda","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-ensureLimitsAreNamed.html","id":null,"dir":"Reference","previous_headings":"","what":"Ensures that a vector or scalar is named according to standard rules — .ensureLimitsAreNamed","title":"Ensures that a vector or scalar is named according to standard rules — .ensureLimitsAreNamed","text":"Ensures vector scalar named according standard rules","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-ensureLimitsAreNamed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ensures that a vector or scalar is named according to standard rules — .ensureLimitsAreNamed","text":"","code":".ensureLimitsAreNamed(x, decreasing = FALSE, nameStrings = NULL)"},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-ensureLimitsAreNamed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ensures that a vector or scalar is named according to standard rules — .ensureLimitsAreNamed","text":"x vector (scalar) named decreasing naming required, x sorted? nameStrings optional vector provides names used. See Usage Notes ","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-ensureLimitsAreNamed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Ensures that a vector or scalar is named according to standard rules — .ensureLimitsAreNamed","text":"x NULL named, returned unaltered. Otherwise, first sorted according descending names names assigned order.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/dot-ensureLimitsAreNamed.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage Notes","title":"Ensures that a vector or scalar is named according to standard rules — .ensureLimitsAreNamed","text":"nameStrings NULL, length must greater equal length x. Otherwise, names determined follows: length(x) 1, name nameString's single element \"action\" 2, names nameString's elements \"action\" \"warn\", order 2 , nameString's elements character equivalent integers 1 length(x). Otherwise t","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateCustomQTL.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply an arbitrary QTL rule to a tibble — evaluateCustomQTL","title":"Apply an arbitrary QTL rule to a tibble — evaluateCustomQTL","text":"function requires two tibbles function, plus arbitrary arguments. One tibble contains observed site level metrics. tibble contains posterior estimate distribution metric. Applying function determine () whether QTL breached (level - eg action warning) (b) observations site level tibble contribute breach.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateCustomQTL.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply an arbitrary QTL rule to a tibble — evaluateCustomQTL","text":"","code":"evaluateCustomQTL(data, posterior, f, statusCol = Status, ...)"},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateCustomQTL.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply an arbitrary QTL rule to a tibble — evaluateCustomQTL","text":"data tibble containing site-level observed metrics posterior tibble containing posterior distribution metric, usually obtained fit Bayes model function. f function evaluates QTL. first two parameters f data posterior defined . statusCol name column augmented data tibble defines status corresponding row ... arguments passed f.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateCustomQTL.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Apply an arbitrary QTL rule to a tibble — evaluateCustomQTL","text":"list containing least two elements. One element character string named status reports status QTL rule. QTL breached, value element \"OK\". values depend actions f, use consistent nomenclature recommended. Functions provided rbqmR package return values \"WARNING\" \"ACTION\". second elements named data contains copy data tibble augmented statusCol. elements return value depend actions f.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateCustomQTL.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Apply an arbitrary QTL rule to a tibble — evaluateCustomQTL","text":"functions serves common basis specific QTL rules may evaluated also avenue evaluation study- specific custom QTL rules may evaluated.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluatePointEstimateQTL.html","id":null,"dir":"Reference","previous_headings":"","what":"Compares a scalar statistic derived from the posterior with one or more fixed values — evaluatePointEstimateQTL","title":"Compares a scalar statistic derived from the posterior with one or more fixed values — evaluatePointEstimateQTL","text":"Compares scalar statistic derived posterior one fixed values","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluatePointEstimateQTL.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compares a scalar statistic derived from the posterior with one or more fixed values — evaluatePointEstimateQTL","text":"","code":"evaluatePointEstimateQTL( data, posterior, metric, stat = mean, observedMetric, statusCol = Status, lower = NULL, upper = NULL )"},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluatePointEstimateQTL.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compares a scalar statistic derived from the posterior with one or more fixed values — evaluatePointEstimateQTL","text":"data tibble containing site-level observed metrics (KRIs) posterior tibble containing posterior distribution metric column posterior metric based stat summary statistic calculated values metric. Default: mean. observedMetric column data containing site level observed metrics (KRIs) statusCol name column added data contain site-level flags comparing corresponding KRI QTL thresholds defined lower upper lower scalar vector lower limits, NULL. See Usage Notes . upper scalar vector upper limits, NULL. See Usage Notes .","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluatePointEstimateQTL.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compares a scalar statistic derived from the posterior with one or more fixed values — evaluatePointEstimateQTL","text":"list three elements named status, data qtl. status \"OK\", breach QTL detected. Otherwise, status equal name serious breach QTL determined values either lower upper. qtl contains value stat function applied metric.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluatePointEstimateQTL.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage Notes","title":"Compares a scalar statistic derived from the posterior with one or more fixed values — evaluatePointEstimateQTL","text":"lower upper NULL. follows, limit refers lower upper. limit names, names used. Otherwise, names assigned based length limit. length(limit) 1, single element named \"action\". length(limit) 2, two elements named \"warn\" \"action\". (case, limit first sorted appropriately.) length(limit) >2, elements named \"1\" \"n\" n length(limit).","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluatePointEstimateQTL.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compares a scalar statistic derived from the posterior with one or more fixed values — evaluatePointEstimateQTL","text":"","code":"post <- (berrySummary %>% fitBayesBinomialModel(Subjects, Events))$tab #> Loading required namespace: rjags #> INFO [2024-06-17 08:46:57] Status of model fitting: OK"},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateProbabilityInRangeQTL.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluates a QTL based on prob(study-level metric lies within a range) — evaluateProbabilityInRangeQTL","title":"Evaluates a QTL based on prob(study-level metric lies within a range) — evaluateProbabilityInRangeQTL","text":"Evaluates probability study-level metric lies within given range based posterior density provided call fit Bayes XXXX Model function. Action warning limits determined parameters range probs. , single range metric, various limits defined, based element probs. Site-level KRIs flagged based values lower upper.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateProbabilityInRangeQTL.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluates a QTL based on prob(study-level metric lies within a range) — evaluateProbabilityInRangeQTL","text":"","code":"evaluateProbabilityInRangeQTL( data, posterior, metric, observedMetric, statusCol = Status, range, probs, lower = NULL, upper = NULL )"},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateProbabilityInRangeQTL.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluates a QTL based on prob(study-level metric lies within a range) — evaluateProbabilityInRangeQTL","text":"data tibble containing site-level observed metrics (KRIs) posterior tibble containing posterior distribution , metric, usually obtained fit Bayes model function. metric column posterior QTL based observedMetric column data containing site level observed metrics (KRIs) statusCol name column added data contain site-level flags comparing corresponding KRI QTL thresholds defined lower upper range range values metric used calculating qtl = Prob(metric range). probs thresholds Prob(metric range) define action warning limits QTL lower scalar vector lower limits, NULL. See Usage Notes . upper scalar vector upper limits, NULL. See Usage Notes .","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateProbabilityInRangeQTL.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluates a QTL based on prob(study-level metric lies within a range) — evaluateProbabilityInRangeQTL","text":"list three elements named status, data qtl. status \"OK\", breach QTL detected. Otherwise, status equal name serious breach QTL determined values either lower upper. qtl contains posterior probability metric lies within range.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateProbabilityInRangeQTL.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Evaluates a QTL based on prob(study-level metric lies within a range) — evaluateProbabilityInRangeQTL","text":"details, see Usage Notes .","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateProbabilityInRangeQTL.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage Notes","title":"Evaluates a QTL based on prob(study-level metric lies within a range) — evaluateProbabilityInRangeQTL","text":"Either lower upper can NULL. follows, limit refers lower upper. #' limit names, names used. Otherwise, names assigned based length limit. length(limit) 1, single element named \"action\". length(limit) 2, two elements named \"warn\" \"action\". (case, limit first sorted appropriately.) length(limit) >2, elements named \"1\" \"n\" n length(limit).","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateSiteMetricQTL.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluates a QTL based on the proportion of site level KRIs within a range — evaluateSiteMetricQTL","title":"Evaluates a QTL based on the proportion of site level KRIs within a range — evaluateSiteMetricQTL","text":"Calculates proportion site-level KRIs lie within range defined quantiles posterior density provided call fit Bayes XXXX Model function.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateSiteMetricQTL.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluates a QTL based on the proportion of site level KRIs within a range — evaluateSiteMetricQTL","text":"","code":"evaluateSiteMetricQTL( data, posterior, metric, observedMetric, statusCol = Status, statusFunc = NULL, lower = NULL, upper = NULL )"},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateSiteMetricQTL.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluates a QTL based on the proportion of site level KRIs within a range — evaluateSiteMetricQTL","text":"data tibble containing site-level observed metrics (KRIs) posterior tibble containing posterior distribution , metric, usually obtained fit Bayes model function. metric column posterior QTL based observedMetric column data containing site level observed metrics (KRIs) statusCol name column added data contain site-level flags comparing corresponding KRI QTL thresholds defined lower upper statusFunc function takes single argument qtl element return value converts status string lower scalar vector lower limits, NULL. See Usage Notes . upper scalar vector upper limits, NULL. See Usage Notes .","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateSiteMetricQTL.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluates a QTL based on the proportion of site level KRIs within a range — evaluateSiteMetricQTL","text":"list three elements named status, data qtl. status \"OK\", breach QTL detected. Otherwise, status equal name serious breach QTL determined values either lower upper. qtl tibble whose rows provide counts number sites whose KRIs lie ranges defined lower upper. addition, quantiles element provides conversion quantiles posterior distribution metric values metric .","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateSiteMetricQTL.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Evaluates a QTL based on the proportion of site level KRIs within a range — evaluateSiteMetricQTL","text":"details, see Usage Notes .","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/evaluateSiteMetricQTL.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage Notes","title":"Evaluates a QTL based on the proportion of site level KRIs within a range — evaluateSiteMetricQTL","text":"Either lower upper can NULL. follows, limit refers lower upper. #' limit names, names used. Otherwise, names assigned based length limit. length(limit) 1, single element named \"action\". length(limit) 2, two elements named \"warn\" \"action\". (case, limit first sorted appropriately.) length(limit) >2, elements named \"1\" \"n\" n length(limit). statusFunc NULL, status element return value set \"OK\" default.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/fitBayesBinomialModel.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit an MCMC Binomial Model to site-specific Counts — fitBayesBinomialModel","title":"Fit an MCMC Binomial Model to site-specific Counts — fitBayesBinomialModel","text":"Given set event counts patient numbers multiple sites, event can occur per patient, fit Bayesian hierarchical Binomial model site-specific event counts.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/fitBayesBinomialModel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit an MCMC Binomial Model to site-specific Counts — fitBayesBinomialModel","text":"","code":"fitBayesBinomialModel( data, n, r, model = NULL, inits = NULL, nChains = ifelse(is.null(inits), 2, length(inits)), ... )"},{"path":"https://openpharma.github.io/rbqmR/main/reference/fitBayesBinomialModel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit an MCMC Binomial Model to site-specific Counts — fitBayesBinomialModel","text":"data data.frame containing participant event counts n column data containing participant counts. Uses tidy evaluation r column data containing event counts. Uses tidy evaluation model character string containing JAGS model fitted. NULL, obtained getModelString(\"binomial). inits list JAGS inits lists suitable use model. NULL (default), nChains random inits generated .createBinomialInit. nChains number chains use. Default 2. inits NULL, must equal length(inits) NULL. ... passed .createBinomialInits .autorunJagsAndCaptureOutput","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/fitBayesBinomialModel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit an MCMC Binomial Model to site-specific Counts — fitBayesBinomialModel","text":"tibble four columns p Simulated values posterior distribution event probabilities. shape1 Simulated values posterior distribution first shape parameter Beta distribution p. shape2 Simulated values posterior distribution second shape parameter Beta distribution p. q Percentile p value falls.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/fitBayesBinomialModel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit an MCMC Binomial Model to site-specific Counts — fitBayesBinomialModel","text":"count patients experiencing event given site assumed follow Binomial distribution, standard statistical distribution expresses probability given number events fixed number possible events. probability depends site-specific probability event occur single patient p_i total number patients site. site-specific probabilities, p_i, assumed follow Beta distribution; continuous distribution values 0 1, two parameters, b, determine shape skewness distribution. Uncertainty parameters Beta distribution accounted specifying prior distributions parameters. \"hyperpriors\" specified Gamma distributions. parameters hyper-priors specified b. default settings specify Gamma(1, 10) distributions allow bell-shaped distributions 0.05 < p_i < 0.95, put low probability precise distributions. Bayesian Hierarchical Model estimates posterior distribution unknown parameters p_i, b, given observed events. Bayes Theorem proportional likelihood observed data given parameters multiplied prior parameters. prior can informed historical data /expert knowledge. data available, posterior less influenced prior influenced data. exact posterior distribution computed directly, hence Markov Chain Monte Carlo (MCMC) method used simulate values p_i, b posterior distribution. number Markov chains can used, minimum 10,000 values simulated 4000 burn-iterations 1000 adaptive iterations. chains checked convergence simulation extended required satisfy basic convergence tests. samples chains combined returned value.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/fitBayesBinomialModel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fit an MCMC Binomial Model to site-specific Counts — fitBayesBinomialModel","text":"","code":"results <- berrySummary %>% fitBayesBinomialModel( n=Subjects, r=Events ) #> INFO [2024-06-17 08:47:00] Status of model fitting: OK"},{"path":"https://openpharma.github.io/rbqmR/main/reference/fitBayesPoissonModel.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit an MCMC Poisson Model to Site-specific Event Rates — fitBayesPoissonModel","title":"Fit an MCMC Poisson Model to Site-specific Event Rates — fitBayesPoissonModel","text":"Given set event data multiple sites, fit Bayesian hierarchical Poisson model site-specific event rates.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/fitBayesPoissonModel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit an MCMC Poisson Model to Site-specific Event Rates — fitBayesPoissonModel","text":"","code":"fitBayesPoissonModel( data, events = NULL, exposure = NULL, model = NULL, inits = NULL, nChains = ifelse(is.null(inits), 2, length(inits)), ... )"},{"path":"https://openpharma.github.io/rbqmR/main/reference/fitBayesPoissonModel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit an MCMC Poisson Model to Site-specific Event Rates — fitBayesPoissonModel","text":"data data frame containing eventVar exposureVar columns events number events per site. NULL \"posterior\" distribution MCMC samples prior. exposure exposure per site. NULL \"posterior\" distribution MCMC samples prior. model character string containing JAGS model fitted. NULL, obtained getModelString(\"binomial). inits list JAGS inits lists suitable use model. NULL (default), nChains random inits generated .createPoissonInit. nChains number chains use. Default 2. inits NULL, must equal length(inits) NULL. ... passed .createPoissonInit .autorunJagsAndCaptureOutput","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/fitBayesPoissonModel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit an MCMC Poisson Model to Site-specific Event Rates — fitBayesPoissonModel","text":"tibble four columns lambda Simulated values posterior distribution rates. shape Simulated values posterior distribution shape. scale Simulated values posterior distribution scale. q Percentile lambda value falls.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/fitBayesPoissonModel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit an MCMC Poisson Model to Site-specific Event Rates — fitBayesPoissonModel","text":"Adverse events given site assumed follow Poisson distribution, standard statistical distribution expresses probability given number events fixed time interval. probability depends site-specific rate parameter \\(\\lambda_i\\) multiplied exposure (total time treatment patients site). site-specific event rates, \\(\\lambda_i\\), assumed follow Gamma distribution; positive continuous distribution two parameters, shape scale, determine average rate spread probability different rates around average. Uncertainty shape scale distribution accounted specifying prior distributions parameters. \"hyper-priors\" also specified Gamma distributions. parameters hyper-priors specified shape scale. default settings specify Gamma(1, 1) distributions equivalent Exp(1) distributions. Bayesian Hierarchical Model estimates posterior distribution unknown parameters \\(\\lambda_i\\), scale shape, given observed events. Bayes Theorem proportional likelihood observed data given parameters multiplied prior parameters. prior can informed historical data /expert knowledge. data available, posterior less influenced prior influenced data. exact posterior distribution computed directly, hence Markov Chain Monte Carlo (MCMC) method used simulate values \\(\\lambda_i\\), scale shape posterior distribution. Two Markov chains used, minimum 10,000 values simulated 4000 burn-iterations 1000 adaptive iterations. chains checked convergence simulation extended required meet convergence diagnostics. samples chains combined returned value.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/fitBayesPoissonModel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fit an MCMC Poisson Model to Site-specific Event Rates — fitBayesPoissonModel","text":"","code":"# load example site rates data(siteRates) # fit MCMC Poisson model with default hyperpriors (basis 1 month) results <- siteRates %>% fitBayesPoissonModel(Events, Exposure) #> INFO [2024-06-17 08:47:03] Status of model fitting: OK"},{"path":"https://openpharma.github.io/rbqmR/main/reference/getModelString.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to obtain the string that defines the default JAGS model for each data type — getModelString","title":"Function to obtain the string that defines the default JAGS model for each data type — getModelString","text":"Function obtain string defines default JAGS model data type","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/getModelString.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to obtain the string that defines the default JAGS model for each data type — getModelString","text":"","code":"getModelString( label = c(\"binary\", \"binomial\", \"normal\", \"poisson\", \"tte\"), hyperParams = list(binomial = c(`` = \"dunif(0, 10)\", `` = \"dunif(0, 10)\"), binary = c(`` = \"dunif(0, 10)\", `` = \"dunif(0, 10)\"), normal = c(`` = \"dnorm(0, 1e-06)\", `` = \"dgamma(1e-06, 1e-06)\"), poisson = c(`` = \"dgamma(1, 1)\", `` = \"dgamma(1, 1)\"), tte = c(`` = \"dnorm(0, 1e-06)\", `` = \"dgamma(1e-06, 1e-06)\")), prior = FALSE )"},{"path":"https://openpharma.github.io/rbqmR/main/reference/getModelString.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to obtain the string that defines the default JAGS model for each data type — getModelString","text":"label type model hyperParams named list named vector defines placeholders model string handled. See Usage Notes . prior Boolean. model prior returned. Default: FALSE.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/getModelString.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to obtain the string that defines the default JAGS model for each data type — getModelString","text":"string defining required model","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/getModelString.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage Notes","title":"Function to obtain the string that defines the default JAGS model for each data type — getModelString","text":"hyperParams list, placeholder replacements taken hyperParams[[label]], named vector. Otherwise, placeholder replacements taken hyperParams directly. , hyperParams named vector. named vector obtained hyperParams, names hyperParams define placeholders replacements corresponding values. example, hyperParams value c(\"\"=\"dunif(0, 10)\", \"\"=\"dunif(0, 20)\"), ever found model string, replaced dunif(0, 10). Similarly, occurrences replaced bydunif(0, 20)`. default value hyperParams provides default hyperparameter values used rbqmR's Bayes model fitting functions.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/getModelString.html","id":"usage-notes-1","dir":"Reference","previous_headings":"","what":"Usage notes","title":"Function to obtain the string that defines the default JAGS model for each data type — getModelString","text":"label determined case insensitively","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/getModelString.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to obtain the string that defines the default JAGS model for each data type — getModelString","text":"","code":"#To fit a binary model binModel <- getModelString(\"binary\")"},{"path":"https://openpharma.github.io/rbqmR/main/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator — %>%","title":"Pipe operator — %>%","text":"See magrittr::%>% details.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator — %>%","text":"","code":"lhs %>% rhs"},{"path":"https://openpharma.github.io/rbqmR/main/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pipe operator — %>%","text":"lhs value magrittr placeholder. rhs function call using magrittr semantics.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pipe operator — %>%","text":"result calling rhs(lhs).","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/shadeRange.html","id":null,"dir":"Reference","previous_headings":"","what":"Shade Areas Under The Curve — shadeRange","title":"Shade Areas Under The Curve — shadeRange","text":"Given existing ggplot2 object, shade area existing density curve.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/shadeRange.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shade Areas Under The Curve — shadeRange","text":"","code":"shadeRange( plot, range = list(list(lower = NA, upper = 0.1, alpha = 0.3, colour = \"goldenrod1\"), list(lower = 0.9, upper = NA, alpha = 0.3, colour = \"goldenrod1\")), idx = 2 )"},{"path":"https://openpharma.github.io/rbqmR/main/reference/shadeRange.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shade Areas Under The Curve — shadeRange","text":"plot ggplot2 object range vector (list vectors) containing definition(s) range(s) shaded. See Usage Notes . idx integer defining index within list returned ggplot2::ggpot_build identifies layer containing density shaded. Typically, corresponds order various geoms added ggplot2 object. example, d %>% ggplot2() %>% geom_point(...) %>% geom_density(...), idx 2`.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/shadeRange.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shade Areas Under The Curve — shadeRange","text":"modified ggplot2 object","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/shadeRange.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage Notes","title":"Shade Areas Under The Curve — shadeRange","text":"range list list vectors. list, contain named elements lower, upper, alpha colour, lower upper contain lower upper x axis values define extent shaded area, colour defines colour shaded area alpha defines alpha value defines transparency shading. alpha 0 denotes complete transparency (invisibility). alpha 1 denotes total opacity, meaning contents layers density invisible within shaded area. define shaded ranges include left- right-extents density, set lower upper respectively NA. list lists, element list list elements defined . example, default value range defines ranges shaded lie 10th centile 90th centile density goldenrod1 using alpha 0.3.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/siteRates.html","id":null,"dir":"Reference","previous_headings":"","what":"A dataset of event rates — siteRates","title":"A dataset of event rates — siteRates","text":"dataset event rates","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/siteRates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A dataset of event rates — siteRates","text":"","code":"siteRates"},{"path":"https://openpharma.github.io/rbqmR/main/reference/siteRates.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"A dataset of event rates — siteRates","text":"tibble 47 rows 6 columns Site site ID Country subject ID Patients number patients site Exposure total exposure site, months Events total number events site Rate site's event rate (events per month)","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/vaLung.html","id":null,"dir":"Reference","previous_headings":"","what":"The Kalbfleisch and Prentice (1980) VA lung dataset. — vaLung","title":"The Kalbfleisch and Prentice (1980) VA lung dataset. — vaLung","text":"@format tibble 137 rows 8 variables: Treatment Treatment group CellType cell type SurvivalTime Survival time since randomisation Status 1=Event, 0=Censored KPS Karnofsky Performance Status Age Age years randomisation PriorTherapy Boolean. received prior therapy? @source Kalbfleisch D Prentice RL (1980), Statistical Analysis Failure Time Data. Wiley, New York","code":""},{"path":"https://openpharma.github.io/rbqmR/main/reference/vaLung.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Kalbfleisch and Prentice (1980) VA lung dataset. — vaLung","text":"","code":"vaLung"},{"path":"https://openpharma.github.io/rbqmR/main/reference/vaLung.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"The Kalbfleisch and Prentice (1980) VA lung dataset. — vaLung","text":"object class tbl_df (inherits tbl, data.frame) 228 rows 11 columns.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/news/index.html","id":"rbqmr-0009002","dir":"Changelog","previous_headings":"","what":"rbqmR 0.0.0.9002","title":"rbqmR 0.0.0.9002","text":"Corrected typos README.md.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/news/index.html","id":"rbqmr-0009001","dir":"Changelog","previous_headings":"","what":"rbqmR 0.0.0.9001","title":"rbqmR 0.0.0.9001","text":"Added createQtlBubblePlot.","code":""},{"path":"https://openpharma.github.io/rbqmR/main/news/index.html","id":"rbqmr-0009000","dir":"Changelog","previous_headings":"","what":"rbqmR 0.0.0.9000","title":"rbqmR 0.0.0.9000","text":"Added NEWS.md file track changes package. Replaced logger futile.logger. Improved test coverage.","code":""}]
diff --git a/pkgdown.yml b/pkgdown.yml
new file mode 100644
index 0000000..ae2657c
--- /dev/null
+++ b/pkgdown.yml
@@ -0,0 +1,9 @@
+pandoc: '3.2'
+pkgdown: 2.0.9
+pkgdown_sha: ~
+articles: {}
+last_built: 2024-06-17T08:46Z
+urls:
+ reference: https://openpharma.github.io/rbqmR/main/reference
+ article: https://openpharma.github.io/rbqmR/main/articles
+