Flag
Flag.RdWrapper around gsm.core::Flag(). Stores vThreshold and vFlag as
attributes for use by downstream visualization functions.
Months where the number of distinct sites falls below nMinSiteFraction
of the peak site count are considered statistically unreliable and have
their Flag set to NA, consistent with the NA bounds returned by
PredictBounds_TimeZFunnel() for the same months.
Arguments
- dfAnalyzed
data.framewhere flags should be added. Must contain columnsNMonthandGroupIDfor sparse-month detection.- vThreshold
numericVector of threshold values in ascending order. Default:c(-3, -2, 2, 3).- vFlag
numericVector of flag values. Must have length equal tolength(vThreshold) + 1. Default:c(-2, -1, 0, 1, 2).- nMinSiteFraction
Minimum fraction of peak site count required to return a non-
NAflag for a month. Months where the number of distinctGroupIDs is below this fraction of the maximum are returned withFlag = NA. Default is0.2(20\ Set to0to disable sparse-month masking.- ...
Additional arguments passed to
gsm.core::Flag().
Value
All columns from dfAnalyzed, plus the following additions:
Flag: Integer fromvFlagindicating how farScorefalls from centre:0within bounds, negative below average, positive above average.NAfor sparse months (seenMinSiteFraction).
Also carries attributes vThreshold and vFlag for downstream use.