Hi Statalist,
I am currently working on a project in an econometrics class to model home price returns over a period of time and am trying to construct an index with the following form:
I_k^H=100*e^(β_k )
for all k ∈{1967,1968,...1999,2001,2018}
I first created dummy variables for each year with the following:
I am struggling to create the (β_k) term with STATA even though I have generated each of the coefficients I need with the following regression.
This leaves out Dyy34 where yy=2000 to make yy=2000 the base year for the index. What I need to do is capture the coefficient for each Dyy, to then create the (β_k) variable to be used in a scatter plot for visualization and comparison with a different index.
How would this be done? I apologize for the relatively basic question, I recognize it is probably a simple answer I just cannot seem to find any answers online.
Thanks in advance,
Josh
I am currently working on a project in an econometrics class to model home price returns over a period of time and am trying to construct an index with the following form:
I_k^H=100*e^(β_k )
for all k ∈{1967,1968,...1999,2001,2018}
I first created dummy variables for each year with the following:
Code:
tab yy, gen(Dyy)
Code:
reg lprice age age2 twnhome acres acres2 sfla rmbed bath bath2 dist dist2 Dyy1 Dyy2 Dyy3 Dyy4 Dyy5 Dyy6 Dyy7 Dyy8 Dyy9 Dyy10 Dyy11 Dyy12 Dyy13 Dyy14 Dyy15 Dyy16 Dyy17 Dyy18 Dyy19 Dyy20 Dyy21 Dyy22 Dyy23 Dyy24 Dyy25 Dyy26 Dyy27 Dyy28 Dyy29 Dyy30 Dyy31 Dyy32 Dyy33 Dyy35 Dyy36 Dyy37 Dyy38 Dyy39 Dyy40 Dyy41 Dyy42 Dyy43 Dyy44 Dyy45 Dyy46 Dyy47 Dyy48 Dyy49 Dyy50 Dyy51 Dyy52, r
How would this be done? I apologize for the relatively basic question, I recognize it is probably a simple answer I just cannot seem to find any answers online.
Thanks in advance,
Josh
Comment