summaryCG: summaryCG Function

View source: R/summaryCG.R

summaryCGR Documentation

summaryCG Function

Description

Summary of restab$descr

Usage

summaryCG(
  res,
  restab,
  dat,
  y,
  xtab = FALSE,
  col = TRUE,
  title = NULL,
  lbl = NULL,
  met.adj = "fdr",
  sz.xtab = 8,
  xtab.type = "latex",
  sort.pval = FALSE,
  color = "#d6c9d6",
  color.font = "white"
)

Arguments

res

an object of class 'compareGroups'

restab

an object of class 'createTable' (of param 'res').

dat

a data frame containing the variables in the model.

y

a vector variable that distinguishes the groups. It must be either a numeric, character, factor or NULL. Default value is NULL which means that descriptives for whole sample are calculated and no test is performed

xtab

A logical value indicating whether the output is a xtable. Default value is FALSE.

col

A logical value indicating the xtable color. Default value is TRUE.

title

Character vector containing the table's caption or title. Default value is NULL.

lbl

Character vector of length 1 containing the LaTeX label. Default value is NULL.

met.adj

correction method. Can be abbreviated. Default value is 'fdr'

sz.xtab

A character vector that is inserted just before the tabular environment starts. This can be used to set the font size and a variety of other table settings. Initial backslashes are automatically prefixed, if not supplied by user. Default value is small.

xtab.type

A character string. Possible values are latex, html, markdown, pandoc, and rst; this will be automatically determined if the function is called within knitr; it can also be set in the global option knitr.table.format. If format is a function, it must return a character string.

Details

The adjustment methods include the Bonferroni correction ('bonferroni') in which the p-values are multiplied by the number of comparisons. Less conservative corrections are also included by Holm (1979) ('holm'), Hochberg (1988) ('hochberg'), Hommel (1988) ('hommel'), Benjamini & Hochberg (1995) ('BH' or its alias 'fdr'), and Benjamini & Yekutieli (2001) ('BY'), respectively.

Value

summary table.

Author(s)

Miriam Mota miriam.mota@vhir.org

See Also

p.adjust

Examples

res <- compareGroups(am ~., dat = mtc_bis, method = NA)
restab <- createTable(res)
summaryCG(res, restab,  dat = mtc_bis, y = 'am', xtab = FALSE)

uebvhir/anaStatsUEB documentation built on May 6, 2023, 3:46 a.m.