aba_control: Create an aba control object.

Description Usage Arguments Value Examples

View source: R/aba_control.R

Description

The aba control which determines how an aba summary will be calculated and printed to console.

Usage

1
2
3
4
5
6
7
8
aba_control(
  include_intercept = FALSE,
  include_covariates = TRUE,
  pval_digits = 4,
  aic_digits = 0,
  metric_digits = 2,
  coef_digits = 2
)

Arguments

include_intercept

boolean. Whether to include intercept in coefs

include_covariates

boolean. Whether to include covariates in coefs

pval_digits

integer. How many decimals of a pvalue to show

aic_digits

integer. How many decimals of AIC value to show

metric_digits

integer. Default value of how many decimals to show for model metrics (e.g., auc, adj.r.squared, etc)

coef_digits

integer. Default value of how many decimals to show for model coefficients

Value

a list with the control parameters specified

Examples

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

# standard example
model <- df %>% aba_model() %>%
  set_groups(everyone()) %>%
  set_outcomes(CSF_ABETA_STATUS_bl) %>%
  set_predictors(
    PLASMA_PTAU181_bl, PLASMA_NFL_bl,
    c(PLASMA_PTAU181_bl, PLASMA_NFL_bl)
  ) %>%
  set_covariates(AGE, GENDER, EDUCATION) %>%
  set_stats('glm') %>%
  aba_fit()

# no control -> default
model_summary <- model %>% aba_summary()
print(model_summary)

# add a control object - don't include covariate coefficients
my_control <- aba_control(include_covariates = FALSE)
model_summary2 <- model %>% aba_summary(control = my_control)
print(model_summary2)

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