Skip to contents

Computes univariate associations between weather features produced by window_pane and a disease response. This implements the screening step commonly used after window-pane feature construction, where each metric-window summary is related to the response using a correlation coefficient and the resulting p-values are adjusted for multiple testing.

Usage

screen_window_features(
  data,
  response_col,
  feature_cols = NULL,
  method = c("spearman", "pearson"),
  adjust_method = "BH"
)

Arguments

data

A data frame that includes the response column and feature columns.

response_col

Name of the response column.

feature_cols

Optional character vector of feature columns to test. If NULL, all numeric columns except the response are screened.

method

Correlation method passed to stats::cor.test(). One of "spearman" or "pearson".

adjust_method

Method used by stats::p.adjust() to correct p-values.

Value

A data frame with feature names, parsed metric/window labels, correlation estimates, raw p-values, adjusted p-values, and sample size.