strataTable: Stratify descriptive table in stratas.

Description Usage Arguments Value References See Also Examples

Description

This functions re-build a descriptive table in stratas defined by a variable.

Usage

1
strataTable(x, strata, strata.names = NULL, max.nlevels = 5)

Arguments

x

an object of class 'createTable'

strata

character specifying the name of the variable whose values or levels defines strata.

strata.names

character vector with as many components as stratas, or NULL (default value). If NULL, it takes the names of levels of strata variable.

max.nlevels

an integer indicating the maximum number of unique values or levels of strata variable. Default value is 5.

Value

An object of class 'cbind.createTable'.

References

Isaac Subirana, Hector Sanz, Joan Vila (2014). Building Bivariate Tables: The compareGroups Package for R. Journal of Statistical Software, 57(12), 1-16. URL http://www.jstatsoft.org/v57/i12/.

See Also

compareGroups, createTable, descrTable

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
require(compareGroups)

# load REGICOR data
data(regicor)

# compute the descriptive tables (by year)
restab <- descrTable(year ~ . - id - sex, regicor, hide.no="no")

# re-build the table stratifying by gender
strataTable(restab, "sex")

compareGroups documentation built on May 27, 2019, 5:01 p.m.