EconPapers    
Economics at your fingertips  
 

MRGTBL2: Stata module to provide a margin-based approach to table 2 from a regression

Niels Henrik Bruun ()
Additional contact information
Niels Henrik Bruun: Aalborg University Hospital

Statistical Software Components from Boston College Department of Economics

Abstract: The output from the mrgtbl2 command is based on margins from the regression model: outcome = constant + i.exposure[#i.by1][#i.by2] + adjustment variables. The user specifies the regression method as one of regress, cnsreg, mixed, glm, poisson, nbreg, logit, probit, cloglog, binreg, meprobit, melogit, mepoisson, menbreg, meglm, or mecloglog Margins calculates metrics, such as linear predictions, probabilities, or risk differences, based on a fitted model's response over a dataset where some or all covariates are fixed at specific values. Margins answers the question: "What does my model have to say about such-and-such scenario?" The scenario in mrgtbl2 is the standard table 2, including confounding by the option adjustments and stratification by the options by1 and by2. There is a conceptual and numerical relationship between the margins command and the Mantel–Haenszel method, as both tools are used to adjust for confounding factors and provide comparable estimates across stratified groups. In the absence of adjustments and stratifications, the output table is applicable for reporting in RCTs.

Language: Stata
Requires: Stata version 15.1
Keywords: margins; regression; table 2 (search for similar items in EconPapers)
Date: 2026-01-07
Note: This module should be installed from within Stata by typing "ssc install mrgtbl2". The module is made available under terms of the GPL v3 (https://www.gnu.org/licenses/gpl-3.0.txt). Windows users should not attempt to download these files with a web browser.
References: Add references at CitEc
Citations:

Downloads: (external link)
http://fmwww.bc.edu/repec/bocode/m/mrgtbl2.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/m/mrgtbl2.sthlp help file (text/plain)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:boc:bocode:s459562

Ordering information: This software item can be ordered from
http://repec.org/docs/ssc.php

Access Statistics for this software item

More software in Statistical Software Components from Boston College Department of Economics Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA. Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().

 
Page updated 2026-01-08
Handle: RePEc:boc:bocode:s459562