View source: R/library--analysis_tools--DHS_methods--classification_function.R
classifyQuantileFlagRegression | R Documentation |
Create wastewater flags based on the CDC classification defined in classifyRegressionAnalysis and the quantile rank of the date.
classifyQuantileFlagRegression(
DF,
Pval = 0.3,
model_sig_column = lmreg_sig,
WW_column = pastKavg.wwlog10
)
DF |
dataframe that contains results of buildRegressionEstimateTable and makeQuantileColumns |
Pval |
threshold needed for flag_ntile_Pval to flag |
model_sig_column |
column name of significance of linear model that generated the percent change |
WW_column |
column containing ww data |
DF with three extra columns cdc_flag: when the CDC method labels as 'major increase' flag_ntile: when the cdc flag and its in the top quantile flag_ntile_Pval: when the flag ntile and the regression slope is less than Pval
data(Example_data, package = "Covid19Wastewater")
Example_data$modeled_percentchange = 0
Example_data$lmreg_sig = .01
Example_data$pastKavg.wwlog10 = 5
Example_data$ntile = 8
classifyQuantileFlagRegression(Example_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.