IDEAS home Printed from https://ideas.repec.org/p/boc/scsy26/05.html

xtvfreg: A Stata command for modeling mean and variance in panel data

Author

Listed:
  • Tim Liao

    (University of Illinois)

Abstract

Standard panel-data models assume homoskedasticity, estimating only how covariates shift the mean of an outcome while treating variance as constant across observations. This assumption can obscure important dimensions of inequality, particularly when the dispersion of outcomes—not just their average level-differs systematically across groups or individuals. This presentation introduces xtvfreg, a community-contributed Stata command that jointly estimates mean and variance equations for panel data using an iterative weighted generalized least-squares (GLS) procedure. Building on the framework proposed and demonstrated for answering a substantive question in Mooi-Reci and Liao (2025, European Sociological Review), xtvfreg allows researchers to model not only who has higher or lower outcomes (via the mean equation) but also who experiences greater or lesser dispersion in those outcomes (via the variance equation), separated by group when necessary. The presentation demonstrates the command's syntax, walks through its iterative estimation algorithm, and provides a step-by-step application using the NLSY women's wage panel data. Attendees will leave with the knowledge to implement xtvfreg in their own research and to think more carefully about variance as a substantive outcome of interest, not merely a nuisance parameter.

Suggested Citation

  • Tim Liao, 2026. "xtvfreg: A Stata command for modeling mean and variance in panel data," Sociology Virtual Symposium 2026 05, Stata Users Group.
  • Handle: RePEc:boc:scsy26:05
    as

    Download full text from publisher

    To our knowledge, this item is not available for download. To find whether it is available, there are three options:
    1. Check below whether another version of this item is available online.
    2. Check on the provider's web page whether it is in fact available.
    3. Perform a
    for a similarly titled item that would be available.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:boc:scsy26:05. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F Baum (email available below). General contact details of provider: https://edirc.repec.org/data/stataea.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.