Help for forest

Description

forest visualizes results from multiple regressions on a single independent variable.
The resulting "forest"-style chart shows the effect of a single "treatment" variable of interest on some set of dependent variables.
It can display raw coefficients, standardized effect sizes (Cohen's d), or odds ratios (from logistic regressions).
It can also make corrections to the confidence intervals or significance estimates for family-wise error control.

Note: forest currently requires that the form of the estimates
are those returned by the standard regress command.
That is, estimates are extracted from the first row of the `r(table)' matrix
after the estimation command. Commands that do not follow this structure
will return incorrect values.

Syntax

forest estimator (depvar family) [(depvar family)] [...]

[weight] [if] [in]

, treatment(varname) [controls(varlist)] [estimation_opts]

[or|d] [bonferroni|bh] [critical(value)]

[sort(local|global)] [graphopts(twoway_options)]

Syntax

Required Inputs

estimator Indicates the estimation command to be utilized.

(depvar family) List the left-hand-side variables in families for error control.
At least one family of dependent variables is required and the parentheses are required.

treatment() List the independent variable of interest
(and any material to follow the estimator and dependent variable and precede the controls, in case of commands like ivregress 2sls).

estimation_opts Specify any options needed for the estimator.

Modelling Options

controls() Specify control variables.
Use "@" to signify the name of the current left-hand-side variable when needed,
such as controls(L.@) to control for lagged values after xtset.

critical() Specify critical p-value for highlighting significant results (default = 0.05).

or|d Request effect sizes as odds ratios (by exponentiating regression coefficients where possible)
or in terms of Cohen's d (by standardizing the dependent variables). Choose only one.

* bonferroni Request confidence intervals calculated with Bonferroni correction for simultaneous comparisons.
This is calculated by adjusting the significance level to (100-5/(number of regressions)) per family.

* bh Request Benjamini-Hochberg significance for simultaneous comparisons.
This is calculated by comparing the raw p-value against (rank/(number of regressions))*0.05 per family.

Display Options

sort(type) Request that results be sorted from the smallest result to the largest.
The local option sorts within each family;
the global option applies the sort to all specified results.

graphopts() Set any desired options for the graph.

* Both bonferroni and bh can be specified, but they produce different adjustments –
Bonferroni control will adjust the confidence intervals, and Benjamini-Hochberg control will adjust the significance.
It is possible to have a BH-significant result whose CI includes the null, with or without Bonferroni adjustment.

Examples

sysuse auto, clear
gen check = rep78 > 3
gen check2 = 1-foreign
label val check origin

forest reg (headroom foreign) , t(rep78)
forest reg (headroom foreign) , t(rep78) d
forest reg (headroom foreign) , t(rep78) b
forest reg (headroom foreign) , t(rep78) bh
forest logit (check2 foreign) , t(check) or

Author

Benjamin Daniels
bbdaniels@gmail.com

Contributing

forest is open for development on GitHub.
Submit bugs and feature requests here.
If you like forest, be sure to visit my homepage.