Hello. I am conducting a project examining the change in value of residential properties in areas before and after the certification of nearby commercial properties as LEED (sustainability certification), compared to control groups of residential properties that are not near these certified buildings.
This requires a difference in differences test, which I have been trying unsuccessfully to conduct. Here is the line of code I have used:
. xtdidregress (VALUE) (bb1), group(Location_numeric) time(post2018Q2)
where bb1 = the treated property location, Location_numeric = the population of properties and post2018Q2 = binary indicator of treatment.
I have been getting the following error: insufficient observations
r(2001);
It may be the case that I do not have enough observations (variables =30, observations = 6405) in the way my regression is currently listed - I am not sure and would really appreciate some guidance. But if it is the case that I have too few observations, is there any other way I can perform some type of difference in difference test and also test for parallel trends?
Many thanks, Hugh. Below is some code. My panel id variable is unique_id and time variable is numeric_quarter
This requires a difference in differences test, which I have been trying unsuccessfully to conduct. Here is the line of code I have used:
. xtdidregress (VALUE) (bb1), group(Location_numeric) time(post2018Q2)
where bb1 = the treated property location, Location_numeric = the population of properties and post2018Q2 = binary indicator of treatment.
I have been getting the following error: insufficient observations
r(2001);
It may be the case that I do not have enough observations (variables =30, observations = 6405) in the way my regression is currently listed - I am not sure and would really appreciate some guidance. But if it is the case that I have too few observations, is there any other way I can perform some type of difference in difference test and also test for parallel trends?
Many thanks, Hugh. Below is some code. My panel id variable is unique_id and time variable is numeric_quarter
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double VALUE str13 NumberofBedrooms long(PropertyType_numeric Location_numeric) float(bb1 post2018Q2 unique_id numeric_quarter) 1846.71 "1 to 3 bed" 4 1 0 1 1 28 1802.75 "1 to 3 bed" 4 1 0 1 2 30 1712.27 "1 to 2 bed" 4 1 0 1 3 31 1798.23 "1 to 3 bed" 4 1 0 1 4 31 1712.27 "Two bed" 4 1 0 1 5 31 1823.27 "1 to 3 bed" 4 1 0 1 6 32 1096.45 "1 to 3 bed" 1 2 0 0 7 3 1094.67 "1 to 2 bed" 1 2 0 0 8 3 1150.5 "1 to 3 bed" 1 2 0 0 9 4 1153.59 "1 to 3 bed" 1 2 0 0 10 5 1153.71 "1 to 2 bed" 1 2 0 0 11 5 1171.79 "1 to 3 bed" 1 2 0 0 12 6 1172.47 "1 to 2 bed" 1 2 0 0 13 6 1194.97 "1 to 3 bed" 1 2 0 0 14 7 1194.97 "1 to 2 bed" 1 2 0 0 15 7 1654.97 "1 to 3 bed" 1 2 0 1 16 19 1654.97 "1 to 2 bed" 1 2 0 1 17 19 1412.95 "1 to 2 bed" 1 3 1 0 18 1 1823.73 "1 to 3 bed" 4 3 1 0 19 1 1181.77 "1 to 2 bed" 3 3 1 0 20 1 end label values PropertyType_numeric PropertyType_numeric label def PropertyType_numeric 1 "Apartment", modify label def PropertyType_numeric 3 "Semi detached house", modify label def PropertyType_numeric 4 "Terrace house", modify label values Location_numeric Location_numeric label def Location_numeric 1 "Arbour Hill, Dublin 7", modify label def Location_numeric 2 "Aungier Street, Dublin 2", modify label def Location_numeric 3 "Ballsbridge, Dublin 4", modify
Comment