Dear all

For my research, I want to estimate the effect of introducing direct election of mayors in Norway. These reforms were introduced in different years. The first election with direct election was I 1999-2003 where 20 municipalities introduced direct election. In 2003-2004, 34 municipalities introduced direct election, but some of the municipality from 1999 did not continue to elect their mayor directly anymore. For the period 2007-2011, 50 municipalities elected their mayor directly, but again some of the municipality from 2003 didn’t continue to elect their mayor directly anymore.

I want to use a Difference-in-Difference model using panel data. The treatment is a binary variable “directmayor” taking value 1 if municipality have direct election and 0 otherwise. I have used election period 1995-1999 as the years before any treatment occurred. I have used Fixed effects and the following stata command:

xtreg lnADmCost directmayor i.year if year>=1995&year<2012, fe cluster(knr)


Do I get a difference-in-difference estimate and is this the correct way to do this?

Does it matter that some of the municipality doesn’t have treatment the whole period after introducing it?

Is it possible to separate between election periods? Can I use a diff-in-diff for the period 1999-2003 and 2003-2007 and 2007-2011? Can someone explain how and correct the stata commands?