Produce table for descriptive statistics by two grouping variables for several variables easily. Depending on the nature of these variables, different descriptive statistical methods were used(t-test, ANOVA,Kruskal-Wallis, chisq, Fisher,...)
mytable2(
formula,
data,
use.labels = TRUE,
use.column.label = TRUE,
max.ylev = 5,
maxCatLevel = 20,
digits = 2,
method = 1,
catMethod = 2,
show.all = FALSE,
exact = FALSE,
show.total = FALSE,
origData = NULL
)
An object of class "formula". Left side of ~ must contain two grouping variables in an additive way(e.g. sex+group~), and the right side of ~ must have variables in an additive way.
A data.frame contains data for analysis
Logical. Whether or not use labels.
Logical. Whether or not use column labels.
An integer indicating the maximum number of levels of grouping variable ('y'). If a column have unique values less than max.ylev it is treated as a categorical variable. Default value is 5.
An integer indicating the maximum number of unique levels of categorical variable. If a column have unique values more than maxCatLevel, categorical summarization will not be performed.
An integer indicating the number of decimal places (round) or significant digits to be used. Default value is 1.
An integer indicating methods for continuous variables. Possible values in methods are
forces analysis as normal-distributed
forces analysis as continuous non-normal
performs a Shapiro-Wilk test to decide between normal or non-normal
Default value is 1.
An integer indicating methods for categorical variables. Possible values in methods are
Perform chisq.test first. If warning present, perform fisher test
Perform chisq.test without continuity correction
Perform chisq.test with continuity correction
perform fisher.test
perform prop.trend test
Default value is 2.
A logical value indicating whether or not all statistical values have to be shown in table. Default value is FALSE.
A logical value indicating whether or not permit call with approximate parameter. If true, only exact column name permitted.Default value is FALSE.
A logical value indicating whether or not show total group value. Default value is FALSE.
A data.frame contains data for analysis
An object of class "cbind.mytable"