View source: R/svyCreateCatTable.R

svyCreateCatTable | R Documentation |

Create an object summarizing categorical variables optionally stratifying by one or more startifying variables and performing statistical tests. Usually, `svyCreateTableOne`

should be used as the universal frontend for both continuous and categorical data.

svyCreateCatTable( vars, strata, data, includeNA = FALSE, test = TRUE, testApprox = svyTestChisq, argsApprox = NULL, smd = TRUE, addOverall = FALSE )

`vars` |
Variable(s) to be summarized given as a character vector. |

`strata` |
Stratifying (grouping) variable name(s) given as a character vector. If omitted, the overall results are returned. |

`data` |
A survey design object in which these variables exist. All variables (both vars and strata) must be in this survey design object. It is created with the |

`includeNA` |
If TRUE, NA is handled as a regular factor level rather than missing. NA is shown as the last factor level in the table. Only effective for categorical variables. |

`test` |
If TRUE, as in the default and there are more than two groups, groupwise comparisons are performed. Both tests that require the large sample approximation and exact tests are performed. Either one of the result can be obtained from the print method. |

`testApprox` |
A function used to perform the large sample approximation based tests. The default is |

`argsApprox` |
A named list of arguments passed to the function specified in testApprox. |

`smd` |
If TRUE, as in the default and there are more than two groups, standardized mean differences for all pairwise comparisons are calculated. |

`addOverall` |
(optional, only used if strata are supplied) Adds an overall column to the table. Smd and p-value calculations are performed using only the stratifed clolumns. |

An object of class `svyCatTable`

.

Kazuki Yoshida, Alexander Bartel

`svyCreateTableOne`

, `print.svyCatTable`

, `summary.svyCatTable`

,

## See the examples for svyCreateTableOne()

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.