Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • xtpmg updated to version 2.0.0 (fix for Stata 15.1+ r(110) MG bug)

    Dear Statalist,

    I have uploaded version 2.0.0 of the user-written command xtpmg to SSC.

    This update resolves a compatibility issue affecting the MG (Mean Group)
    estimator when running under Stata 15.1 and later.

    In the legacy 2007 implementation (Blackburne & Frank), the MG routine
    fails with:

    invalid new variable name
    r(110);

    The error is triggered by stricter validation rules introduced in Stata's
    internal _predict command (20 Feb 2019 update). The original code used the
    same name for both the output variable and the eq() equation reference,
    which is no longer allowed.

    Version 2.0.0 corrects this by predicting into a temporary variable and
    then generating the requested EC variable, preserving the original
    estimation logic while ensuring full compatibility with modern Stata
    releases.

    Additional improvements include:

    • Minimum supported Stata version raised to 15.1
    • Cleaner EC handling and improved option parsing
    • Updated help file in SMCL format (SSC compliant)
    • Improved error messages
    • Version number displayed in estimation output

    To install or update:

    ssc install xtpmg, replace


    .

  • #2
    Hi Merwan Roudane, can you explain the differences in the optimization process and estimated coefficients that can be observed before and after the update? I've posted estimation results before and after you updated xtpmg2. Thanks!
    Attached Files
    Last edited by Vinko Zaninovic; 20 Feb 2026, 05:01.

    Comment

    Working...
    X