aba_adjust | R Documentation |
Adjust the p-values (model and/or coefficients) of an abaSummary object.
aba_adjust(
method = c("none", "bonferroni", "fdr", "hochberg", "holm", "hommel", "BH", "BY"),
family = c("group", "outcome", "stat"),
target = c("metric", "coef")
)
method |
string. The method to adjust with. See |
family |
vector. Which factors to consider a family together Possible choices: group, outcome, stat, predictor |
target |
vector. Whether to adjust both metrics and coefs, or just one. |
an abaSummary object. The abaSummary passed to aba_adjust but with p-values changed according to how the user specified.
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', family = c('group')))
# correct only model P-values, not coefficient P-values
model_summary_adj3 <- model %>%
aba_summary(adjust=aba_adjust(target = c('metric')))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.