*! version 1.0 10 October 2024

help for pretty_linear Version 1.0 10 October 2024

Author

Georgia McRedmond & Rafael Gafoor
University College London, London UNITED KINGDOM
r.gafoor@ucl.ac.uk

Version Date Comments
1.0 10 October 2024 First release

Syntax

pretty_logistic
[if]
[in]
[,
options]

Required
independent(varname) - Independent Variable.

dependent(varlist) - Dependent Variable(s).

Optional
confounders(varlist) - Confounding variables.fvvarlist operators can be used to specify relationships and factor/continuous variables.

flin(format) - Specify the format of decimal points for the main coefficients.

fci(format) - Specify the format of decimal points for the confidence intervals.

fp(format) - Specify the format of decimal points for the probability.

saving(saving) - Saves table as docx, can specify path and name of file.

Description

pretty_logistic generates publication quality tables of linear regression results.

The linear coefficient, 95% confidence interval and p-value will be produced.

The default number of decimal places for the linear coefficient, 95% confidence interval, and p-value are three decimal places. The decimal place options can be changed for
the coefficient, the 95% confidence interval, and the p-value using the flog, fci or fp options. Guidance can be found in Stata help files for the formatting options format.

Confounders can be specified using the confounders option. Confounders can be categorical or continuous, factor and continuous confounders as well as their relationship to each other can be specified through factor-variable operators.
Guidance can be found in Stata help files for the factor-variabel operator options fvvarlist.

The default variable labels for the table are the variable labels from the dataset. Where variable labels are not specified, variable names will be presented.

The default notes for adjusted coefficents use the confounder variable labels from the dataset. Where variable labels are not specified for all confounders, variable names will be presented.

Examples

Setup

. webuse nhanes2l, clear

Basic Linear Regression Table

. pretty_linear, independent(age) dependent(bmi)

Setup

. webuse nhanes2l, clear

Adjusted Linear Regression Table

. pretty_linear, independent(age) dependent(bmi)confounders(c.vitaminc##i.highbp)

Setup

. webuse nhanes2l, clear

Linear Regression Table with Multiple Dependent Variables

. pretty_linear, independent(age) dependent(bmi weight) confounders(c.vitaminc i.heartatk) flin(%9.2fc)