summaryCG: summaryCG Function

View source: R/summaryCG.R

summaryCGR Documentation

summaryCG Function

Description

Summary of restab$descr

Usage

summaryCG(...)

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

met.adj

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

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.

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.

lbl

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

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 April 13, 2025, 5:38 p.m.