View source: R/library--analysis_tools--DHS_methods--classification_function.R
classifyCaseRegression | R Documentation |
Create Case Flags based on regression slope
classifyCaseRegression(
DF,
slopeThreshold = 5,
minSize = 200,
per_changed_column = modeled_percentchange,
model_sig_column = lmreg_sig
)
DF |
dataframe that contains results of buildRegressionEstimateTable |
slopeThreshold |
number threshold for case_flag flagging |
minSize |
case threshold for case_flag_plus_comm.threshold flagging |
per_changed_column |
column name of estimated percent change of signal |
model_sig_column |
column name of significance of linear model that generated the percent change |
DF with an three extra column Category containing the case flags case_flag: when the 7 day slope is above slopeThreshold case_flag_plus_comm.threshold: when case flag and more then 200 cases slope_switch_flag: the first case flags in consecutive case flags
example_DF <- data.frame(site = "madison", lmreg_slope = 5, value = 300)
classifyCaseRegression(example_DF)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.