EconPapers    
Economics at your fingertips  
 

BINSCATTERHIST: Stata module to produce binned scatterplot with marginal histograms

Matteo Pinna ()

Statistical Software Components from Boston College Department of Economics

Abstract: binscatterhist generates binned scatterplots, with the option to plot the variables underlying distribution. Binned scatterplots provide a non-parametric way of visualizing the relationship between two variables, binscatterhist adds to the popular program used to produce such scatterplots, binscatter, the tools to furthermore plot histograms of the scattered variables. As binscatter, binscatterhist solves the problem of scatterplots with a large number of observations: it groups the x-axis variable into equal-sized bins, computes the mean of the x-axis and y-axis variables within each bin, then creates a scatterplot of these data points. binscatterhist allows in addition to create histograms of the scattered variables, and include them in the graph for a more complete representation of the data. binscatterhist provides the same options as binscatter: it provides built-in options to control for covariates before plotting the relationship (see Controls), and will plot fit lines based on the underlying data, and can automatically handle regression discontinuities (see Fit Line).

Language: Stata
Requires: Stata version 12.1 and addplot from SSC (q.v.)
Keywords: graphics; scatterplots; binned data; histogram (search for similar items in EconPapers)
Date: 2020-10-22, Revised 2023-05-04
Note: This module should be installed from within Stata by typing "ssc install binscatterhist". 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/b/binscatterhist.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/b/binscatterhist.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/b/binscatterhist_example.do sample do-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:s458855

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 2025-03-30
Handle: RePEc:boc:bocode:s458855