*! version 2.0 08jan2024

epitable3 -- Create a table of association between exposure and outcome variables by various stratification variables.

Syntax

Create a table of association between an exposure variable and an outcome variable, broken down by various stratification variables.

epitable3 commandname depvar xvar indepvars [if] [in] [weight], by(groupvars) [options]

options

dp(#) set coeff. & conf. int. to # decimal places; default is dp(2)

cilimiter(strings:string) conf. int. separator; default is cilimiter("-")

title(strings:string) Add a title to your table

notes(strings:string) Add note(s) to your table, mutliple notes need to be enclosed in double-quotes

ptrendvar(varname) Calculates the p for trend based on the variable specified instead of xvar; designed to allow application of a median in each quartile

aftercovars(varlist) This is required for mixed regressions, or any other regression where additions are made after the indepvars are given

collection(strings:string) Name the collection your table will be collected into; default is collection("table3")

export exports to a currently open putdocx document, or opens and exports to a new putdocx document

opcon Caculates p for interaction as the opposite of xvar type; if xvar is factor calculates p for interaction as continuous and vice versa

export does not save the document, allowing you to continue adding to it.

Options used by commandname should also be able to be applied here, though this has not been extensively tested.

Description

epitable3 creates a table with regression coefficients and 95% confidence intervals for xvar, broken down by various stratified or factor variables. A p-value for trend of each individual within-variable category is given, as well as a
p-value for interaction for each overall stratified or factor variable. If xvar is given as a factor variable, the regression coefficients and 95% confidence intervals for xvar are shown over each quartile.

This table is commonly referred to as Table 3 in epidemiological studies. The layout is pre-defined and uses shorter syntax, allowing for faster table generation than would be possible if the user set the table up themselves using collect
commands.

Examples

Setup

. webuse nhanes2

. collect clear

Create a table of association for a continuous covariate

. epitable3 logistic diabetes lead age bmi highbp, by(sex race region)

Setup

. webuse nhanes2

. collect clear

. xtile iron4c = iron, nq(4)

Create a table of association for a factor covariate (usually only has 4 factors)

. epitable3 logistic diabetes i.iron4c age bmi highbp, by(sex race region)

Notes

While this command has been designed to work with various regression modelling commands, it has only been tested by the author on regress, logistic, and mixed. It has not been extensively tested. If you encounter errors
with other commands, please forward them through to the author.

Author

Laura C Whiting

IT Support

Survey Design and Analysis Services

Canberra, Australia

support@surveydesign.com.au

This package was developed with the assistance and direction of:

Zumin Shi

Human Nutrition Department, College of Health Sciences, QU Health

Qatar University

Doha, Qatar