Announcement

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

  • Panel Sub-Sample Analysis

    Hello,
    We are running paneldata and want to do a sub-sample analysis. The LSDV is our method with time and id dummies. Our topic is housing prices in Norway with various independent variables. Our panel id is cities, but we would like to research our panel on a regional level as well.
    We use these commands:

    Code:
     egen bykode = group (By)
     xtset bykode År, yearly
    
     gen lnpris =ln(Kvadratmeterpris)
     gen lninntekt =ln(Inntekti1000)
     gen lnnybygg =ln(Nybygg)
     gen lntetthet =ln(Befolkningperboligbygg)
     gen lninnbyggere =ln(Innbyggere)
     
     generate storby = 0
     replace storby = 1 if Innbyggere>50000
     
    tab Region, gen(region)
    
    eststo:reg lnpris lninntekt lnnybygg lntetthet lninnbyggere Nettoinnflytting Ledighet storby if Region=="Vest", r
    eststo:reg lnpris lninntekt lnnybygg lntetthet lninnbyggere Nettoinnflytting Ledighet storby if Region=="Øst", r
     eststo:reg lnpris lninntekt lnnybygg lntetthet lninnbyggere Nettoinnflytting Ledighet storby if Region=="Sør", r
     eststo:reg lnpris lninntekt lnnybygg lntetthet lninnbyggere Nettoinnflytting Ledighet storby if Region=="Midt", r
     eststo:reg lnpris lninntekt lnnybygg lntetthet lninnbyggere Nettoinnflytting Ledighet storby if Region=="Nord", r
     esttab * using "/Users/****/Desktop/Regioner2.rtf"
     drop _est_est1 _est_est2 _est_est3 _est_est4 _est_est5
     clear all

    Our question is if whether or not we can achieve fixed effects on a sub-sample analysis.
    Our goal is to compare how the coefficients differ on the regional levels, but we are unsure if we can do so with the above method.
    Last edited by Hauk Bogshamn; 27 May 2023, 11:24.

  • #2
    I´m no expert, but you could try making a dummy for each year and then include all dummyvariables except one in your estesto:reg functions.

    Code:
    tab År, gen(y) 
     eststo:reg lnpris lninntekt lnnybygg lntetthet lninnbyggere Nettoinnflytting Ledighet storby y2 y3 .... yT if Region=="Vest", r

    Comment

    Working...
    X