Hi
I am estimating a varying parameter hedonic pricing model with the aim of developing a hedonic pricing index. Essentially i am pooling two quarters of data together, estimating least squares with a time dummy variable, extracting the coefficient of the time dummy variable (which is my pure price change), and then redoing it for the another two quarters of data, and so on. With more than 20 years of data, i was thinking of doing some sort of loop but I have no idea how to go about doing this. I reckon this is probably pretty easy but I'm completely new to programming and any help would be much appreciated. Currently i have a dummy variable for each quarter in each year but that seems terribly inefficient to me.
Thanks!
series hedonic_index
'sample 2008q1 and q2 only, where 2008q1 and 2008q2 are time dummy variables for observations in these quarters
smpl if _2008q1 = 1 or _2008q2 = 1
'regress log of resale price on explanatory variables & a time dummy variable for 2nd quarter
equation eq1.ls log(price) c X _2008q2
'store the coefficient of the time dummy variable in the index series, taking exponential to get price level
hedonic_index(1) = exp(eq1.c(14))
'repeat for 2008q2 and q3
smpl if _2008q2 = 1 or _2008q3 = 1
equation eq2.ls log(price) c X _2008q3
hedonic_index(2) = exp(eq2.c(14)+eq1.c(14))
smpl if _2008q3 = 1 or _2008q4 = 1
equation eq3.ls log(price) c X _2008q4
hedonic_index(3) = exp(eq3.c(14)+eq2.c(14)+eq1.c(14))
.....
varying parameter hedonic pricing model
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Who is online
Users browsing this forum: No registered users and 2 guests
