Funnel Plot Analysis with Normal Approximation for Binary and Rate Outcomes.
Source:R/Analyze_OneSideProp.R
Analyze_OneSideProp.Rd
Creates analysis results data for percentage/rate data using funnel plot method with normal approximation.
Arguments
- dfTransformed
data.frame
Transformed data for analysis. Data should have one record per site with expected columns:GroupID
,GroupLevel
,Numerator
,Denominator
, andMetric
. For more details see the Data Model vignette:vignette("DataModel", package = "gsm.core")
. For this function,dfTransformed
should typically be created usinggsm.core::Transform_Rate()
.- nPropRate
a numeric, between 0 and 1, that represents a proportion of comparison, e.g. a historic screen failure rate
- nNumDeviations
a numeric, e.g. '3', standard deviations away from the value provided in
nPropRate
to calculate a threshold to which theMetric
should be flagged
Value
data.frame
with one row per site with columns: GroupID, GroupLevel, Numerator,
Denominator, Metric, upper_funnel and flag
Statistical Methods
This function applies funnel plots using a fixed proportion/rate and number of standard deviations according to the one-sided Z proportion test.
Examples
# Binary
dftransformed <- tibble::tribble(
~GroupID, ~GroupLevel, ~Numerator, ~Denominator, ~Metric,
"ABC", "Study", 25, 100, 0.25
)
dfAnalyzed <- Analyze_OneSideProp(dftransformed, nPropRate = 0.01, nNumDeviations = 3)