------------------------------------------------------------------------------- help forunitab-------------------------------------------------------------------------------

Univariate table

unitabdepvar[varlist1] [ifexp] [inrange]] [,level(#)format(%fmt)categorical(varlist2)exact]

Description

unitabdisplays a univariate table with the maximum-likelihood estimates of odds ratio and confidence intervals using logit command and some useful information using tabulate command.

depvarbinary dependent variable that must be coded asdepvar= 0 ordepvar= # with # > 0

varlist1covariates treated as continuous.varlist2covariates treated as categorical.You can specify the same variable as continuous and/or categorical. First results are displayed for continuous variables and then for categorical variables.

Explanation of the tableContinuous variable

1 column : summarize

depvarifcontinuous_variable== #2 column : total observations

3 column : point estimate of odds ratio using maximum likelihood estimators logit

4-5 columns : lower and upper bound for odds ratio at a certain

level(#)6 column : statistical significance of the odds ratio using a Wald test

Categorical variable

1 column : tabulate

depvar categorical_variable(display only fordepvar= # )2 column : total observations for each category

3 column : point estimate of odds ratio using maximum likelihood estimators

4-5 columns : lower and upper bound for odds ratio at a certain

level(#)6 column : statistical significance of the Pearson's chi-squared test for the hypothesis that the rows and columns in a two-way table are independent

Options

level(#)specifies the confidence level, in percent, for calculation of con > fidence intervals of the odds ratios; see help levelformat(%fmt)specifies the display format for odds ratio and confidence int > ervals in the univariate table.format(%4.3f)is the default;format(%6.5f)is a popular al > ternative.categorical(varlist2)specifies the variables that you want treat as catego > rical.exactdisplays the significance calculated by Fisher's exact. We recommend specifyingexactwhenever samples are small.

Examples

. webuse lbw, clear. tab low. su age. su age if low == 1. logistic low age. unitab low age. xtile ageq = age, nq(4). tab ageq low, row nokey chi2. tab ageq low, row nokey exact. xi: logistic low i.ageq. unitab low, c(ageq). unitab low, c(ageq) exact. unitab low age, c(ageq). tab race low, row nokey. xi:logistic low i.race. unitab low , c(race). unitab low age ht ui, c(race smoke ageq). unitab low age ht ui, c(race smoke ageq) l(90) f(%6.5f)AuthorsNicola Orsini, Institute of Environmental Medicine, Karolinska Institutet, Stockholm, Sweden and Institute of Information Science and Technology, National Research Council of Italy, Pisa, Italy.

Matteo Bottai, Arnold School of Public Health, University of South Carolina, Columbia, USA and Institute of Information Science and Technology, National Research Council of Italy, Pisa, Italy.

SupportNicola Orsini, http://nicolaorsini.altervista.org, Karolinska Institutet, Sweden nicola.orsini@imm.ki.se

Also see

[R] logistic[R] tabulateOn-line: help for logit, logistic, table, tabulate, tabstat, tabodds, epitab