Skip to contents

How causalInferencePipeline picks which TWAS method's weights to use for each (study, context, trait, gwasStudy) tuple, from the cross-validation metrics on the cvResult. Selection runs when cutoff > 0 or pvalCutoff is finite; otherwise every method is carried through.

Usage

WeightSelectionParam(
  cutoff = 0,
  pvalCutoff = Inf,
  metric = "rsq",
  pvalMetric = c("adj_rsq_pval", "pval")
)

Arguments

cutoff

Numeric. Minimum cross-validated r-squared a method must reach to be eligible. Default 0 (no r-squared gate).

pvalCutoff

Numeric. A method is eligible only when its cvResult p-value metric is below this. Default Inf (no gate). A finite value activates selection even when cutoff = 0.

metric

Character. Which cvResult metric is the r-squared used for the cutoff and for ranking; typically "rsq" or "adj_rsq". Default "rsq".

pvalMetric

Character vector of candidate cvResult metric names for the p-value gate; the first one present in a tuple's metrics is used. Default c("adj_rsq_pval", "pval").

Value

A WeightSelectionParam object, a MethodParam.

Examples

WeightSelectionParam(cutoff = 0.01, metric = "adj_rsq")
#> <WeightSelectionParam>
#>   cutoff                   0.01
#>   pvalCutoff               Inf
#>   metric                   adj_rsq
#>   pvalMetric               adj_rsq_pval, pval