Announcement

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

  • How to perform repeat sales regression on housing data

    Dear all,

    I would like to perform a repeat sales analysis based on housing data from the American Housing Survey.
    List of variables: https://www.census.gov/data-tools/de...s_searchvalue=

    With the code below, I was already able to perform a hedonic regression analysis based on the house price, quarter of the year and some house characteristics:

    Code:
    reg loglprice i.q loglot logunitsf floors rooms bedrms baths 1.garage 1.porch 1.fplwk 1.airsys
    margins, at(q==(1 (1) 4)) atmean
    marginsplot
    Some basic information:

    - sampling period: 1999-2013
    - the repeat-sales method assesses how house valuations change over time by focusing on the different sale prices of the same piece of real estate.
    Note: house has to be sold at least twice in the sampling period.

    Data initialisation code:

    Code:
    clear all
    set more off
    cd "C:\Users\eljattaa\Desktop\MP"
    use "C:\Users\eljattaa\Desktop\MP\data analyse\FULL merge pers.dta"
    
    gen int_year = mod(date, 10000)
    gen time_in_houseY = int_year-hhmove
    keep if time_in_houseY<=2 
    keep if hhmove>=1999 & hhmove<=2013
    
    
    gen yearquarter = qofd(dofm(ym(hhmove, hhmovm)))
    format yearquarter %tq
    
    gen loglprice=log(lprice)
    gen byte q=quarter(dofq(yearquarter))
    
    keep if lprice>=0
    keep if lot>=0 
    keep if unitsf>=0
    keep if floors>=0
    keep if rooms>=0  
    keep if bedrms>=0
    keep if baths>=0
    keep if garage>=0
    keep if porch>=0
    keep if fplwk>=0
    keep if airsys>=0
    keep if howh>=0
    
    gen loglot=log(lot)
    gen logunitsf=log(unitsf)
    Since there are multiple observations for each house available, I assume I can perform a repeat sales analysis as well (= with house fixed effects).

    Does anyone have an idea on how to prepare the code in Stata?
    Afterwards, I would like to compare the average home prices of the repeat sales and the hedonic price analysis.

    Thanks in advance!

  • #2
    We're not from your area, so you'll need to tell us more clearly what you mean by a repeat sales analysis. What model are you trying to run?

    Providing sample data using dataex will help us help you.

    Also, you'll get better results from the listserve if you don't include a bunch of largely irrelevant code (like all the keep statements, the generation of year-quarter, etc.).

    Comment

    Working...
    X