EconPapers    
Economics at your fingertips  
 

XTBALFRONT: Stata module to trade-off frontier diagnostics and balanced-subsample selection for unbalanced panel data

Noman Arshed

Statistical Software Components from Boston College Department of Economics

Abstract: xtbalfront examines an unbalanced panel and characterises the trade-off between balanced length (number of years) and balanced breadth (number of cross-sections) implied by the pattern of missing data on a user-supplied variable list. By default it produces a panel-structure summary (xtset + xtdescribe), both a "best-window" trade-off curve (best obtainable balanced sample at each length) and a "recency-anchored" curve (sample held to end at the most recent period), together with a presence/absence heatmap, a histogram of per-cross-section data availability, an internal-gap diagnostic, and the L*N peak (the largest balanced sample). When the analyst supplies years() or crosssections(), the command additionally produces a Welch t-test comparison of the proposed subsample against the discarded cross-sections, an overlaid pre/post histogram for each variable showing the distributional shift with the percentage change in the mean in the note, lists the selected cross-sections, and either creates an indicator variable (generate()) or restricts the dataset (keep). A dryrun option lets the analyst review the diagnostics before committing. The command emphasises analyst flexibility - any window length, any anchor, any subset target - and a quantitative read on how the chosen subsample differs distributionally from the original unbalanced data.

Language: Stata
Requires: Stata version 16
Keywords: panel data; unbalanced panels (search for similar items in EconPapers)
Date: 2026-05-07
Note: This module should be installed from within Stata by typing "ssc install xtbalfront". The module is made available under terms of the MIT license (https://opensource.org/licenses/MIT).
References: Add references at CitEc
Citations:

Downloads: (external link)
http://fmwww.bc.edu/repec/bocode/x/xtbalfront.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/x/xtbalfront.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:s459699

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-05-10
Handle: RePEc:boc:bocode:s459699