Announcement

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

  • Generata price index using 'parmest'

    Hi all,

    I want to generate a price index using the coefficients of the following regression:

    with dependent variable= loglprice (log of house selling price)
    and independent variable= hhmove (year moved into the house)

    reg loglprice i.hhmove

    I want to use the year coefficients of the output table of this regression to generate a price index.

    A price index can be generated by taking the exponential transformation of the estimated year coefficients (var HHMOVE) and multiplying that by 100.

    To do so, something like this should be entered in Stata I guess:

    gen logcoef=log(coef)
    gen priceindex=logcoef*100


    The question is how can I use the year coefficients (coef?) from the output table?
    I believe the 'parmest'- command can help but I am not sure.

    Thanks.
    Last edited by Mat Sko; 28 Apr 2019, 05:07. Reason: price index parmest regression parameter estimate coefficient

  • #2
    It is massively easier to just use predict after regress to generate the predicted value for your index.

    I question whether your calculation strategy is right - what you want the exponent of is not the single coefficient but rather the full prediction including intercept and any other variables.

    For your information, after regress, you can issue regress, coefl and it will show you how to refer to the coefficients. You can then use _b[coef] to access the coefficients.

    Comment

    Working...
    X