Learn R Programming

BayesERtools (version 0.2.0)

print_coveff: Format the covariate effect simulation results for printing

Description

Format the covariate effect simulation results for printing

Usage

print_coveff(
  coveffsim,
  n_sigfig = 3,
  use_seps = TRUE,
  drop_trailing_dec_mark = TRUE
)

Value

A data frame with the formatted covariate effect simulation results with the following columns:

  • var_label: the label of the covariate

  • value_label: the label of the covariate value

  • value_annot: the annotation of the covariate value

  • Odds ratio: the odds ratio of the covariate effect

  • 95% CI: the 95% credible interval of the covariate effect

Arguments

coveffsim

an object of class coveffsim

n_sigfig

Number of significant figures to form value_label of continuous variables. See gt::vec_fmt_number() for details.

use_seps

Whether to use separators for thousands in printing numbers. See gt::vec_fmt_number() for details.

drop_trailing_dec_mark

Whether to drop the trailing decimal mark (".") in value_label of continuous variables. See gt::vec_fmt_number() for details.

Details

Note that n_sigfig, use_seps, and drop_trailing_dec_mark are only applied to the odds ratio and 95% CI columns; value_label column was already generated in an earlier step in build_spec_coveff() or sim_coveff().

Examples

Run this code
data(d_sim_binom_cov_hgly2)

ermod_bin <- dev_ermod_bin(
  data = d_sim_binom_cov_hgly2,
  var_resp = "AEFLAG",
  var_exposure = "AUCss_1000",
  var_cov = "BHBA1C_5",
)

print_coveff(sim_coveff(ermod_bin))

Run the code above in your browser using DataLab