Learn R Programming

Covid19Wastewater (version 1.0.1)

classifyQuantileFlagRegression: Classify FlagRegression with rolling Quantile info

Description

Create wastewater flags based on the CDC classification defined in classifyRegressionAnalysis and the quantile rank of the date.

Usage

classifyQuantileFlagRegression(
  DF,
  Pval = 0.3,
  model_sig_column = lmreg_sig,
  WW_column = pastKavg.wwlog10
)

Value

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

Arguments

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

Examples

Run this code
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)

Run the code above in your browser using DataLab