fsmry.by.grp: Summarize a continuous variable by a categorical variable

View source: R/fsmry.by.grp.R

fsmry.by.grpR Documentation

Summarize a continuous variable by a categorical variable

Description

Summarize a continuous variable by a categorical variable

Usage

fsmry.by.grp(y, grp, log.tr = F, method = "Tukey", method.padj = NULL,
  paired = F, IQR = T)

Arguments

y

A continuous variable.

grp

A categorical group variable.

log.tr

An indicator of whether to log transform y

method

Text string for multiple comparisons method if there are more than 2 categories, such as "Tukey", "Dunnet", or specifying the contrast

method.padj

Text string for specifying method for multiple adjustment of p-values, e.g., "bonferroni", "fdr", etc.

paired

An indicator of whether paired test should be used

IQR

An indicator of whether to summarize y using IQR (default) or range.

Value

Summary of difference in y by grp using parametric and non-parametric methods.

Examples

fsmry.by.grp(y=c(rnorm(10), rnorm(10, mean=0.5)),
             grp=factor(rep(c("grp1", "grp2"), each=10)))

xkzhou/BTKR documentation built on Feb. 1, 2023, 1:14 a.m.