aba_adjust: Create an aba_adjust object.

Description Usage Arguments Value Examples

View source: R/aba_adjust.R

Description

Adjust the p-values (model and/or coefficients) of an abaSummary object.

Usage

1
2
3
4
5
aba_adjust(
  method = c("none", "bonferroni", "fdr", "hochberg", "holm", "hommel", "BH", "BY"),
  by = c("group", "outcome", "stat"),
  form = c("metric", "coef")
)

Arguments

method

string. The method to adjust with. See p.adjust.

by

vector. The groupings to use for adjustment. Possible choices: group, outcome, stat, predictor_set

form

vector. Whether to adjust both metrics and coefs, or just one.

Value

an abaSummary object. The abaSummary passed to aba_adjust but with p-values changed according to how the user specified.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
df <- adnimerge %>% dplyr::filter(VISCODE == 'bl')

model <- df %>% aba_model() %>%
  set_groups(everyone()) %>%
  set_outcomes(ConvertedToAlzheimers, CSF_ABETA_STATUS_bl) %>%
  set_predictors(
    PLASMA_ABETA_bl, PLASMA_PTAU181_bl, PLASMA_NFL_bl,
    c(PLASMA_ABETA_bl, PLASMA_PTAU181_bl, PLASMA_NFL_bl)
  ) %>%
  set_stats('glm') %>%
  fit()

# no adjustment
model_summary <- model %>% aba_summary()

# default - correct within group, outcome, and stat (x4 comparisons)
model_summary_adj <- model %>%
  aba_summary(adjust = aba_adjust(method='bonferroni'))

# correct within group but across outcomes (x8 comparisons)
model_summary_adj2 <- model %>%
  aba_summary(adjust=aba_adjust(method='bonferroni', by = c('group')))

# correct only model P-values, not coefficient P-values
model_summary_adj3 <- model %>%
  aba_summary(adjust=aba_adjust(form = c('metric')))

aba documentation built on Dec. 17, 2021, 1:06 a.m.