Funnel Plot Analysis with Normal Approximation - Predicted Boundaries.
Source:R/Analyze_NormalApprox_PredictBounds.R
Analyze_NormalApprox_PredictBounds.RdApplies a funnel plot analysis with normal approximation to site-level data, and then calculates predicted percentages/rates and upper- and lower-bounds across the full range of sample sizes/total exposure values.
Usage
Analyze_NormalApprox_PredictBounds(
dfTransformed,
vThreshold = c(-3, -2, 2, 3),
strType = "binary",
nStep = NULL
)Arguments
- dfTransformed
data.frameTransformed 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 article. For this function,dfTransformedshould typically be created usingTransform_Rate().- vThreshold
numericupper and lower boundaries based on standard deviation. Should be identical to the thresholds used in*_Assess()functions.- strType
characterStatistical method. Valid values:"binary"(default)"rate"
- nStep
numericstep size of imputed bounds.
Value
data.frame containing predicted boundary values with upper and
lower bounds across the range of observed values.
Statistical Methods
This function applies a funnel plot analysis with normal approximation to site-level data and then calculates predicted percentages/rates and upper- and lower- bounds (funnels) based on the standard deviation from the mean across the full range of sample sizes/total exposure values.
Examples
# Binary
dfTransformed <- Transform_Rate(analyticsInput)
dfAnalyzed <- Analyze_NormalApprox(dfTransformed, strType = "binary")
#> `OverallMetric`, `Factor`, and `Score` columns created from normal
#> approximation.
dfBounds <- Analyze_NormalApprox_PredictBounds(dfTransformed, c(-3, -2, 2, 3), strType = "binary")
#> nStep was not provided. Setting default step to 3.208.
# Rate
dfAnalyzed <- Analyze_NormalApprox(dfTransformed, strType = "rate")
#> `OverallMetric`, `Factor`, and `Score` columns created from normal
#> approximation.
dfBounds <- Analyze_NormalApprox_PredictBounds(dfTransformed, c(-3, -2, 2, 3), strType = "rate")
#> nStep was not provided. Setting default step to 3.208.