Dear all,
I wanted to ask if I use the correct function to set-up the model for a did:
did=time*treated
didreg = lm(y ~ time + treated+ did + x + factor(year) + factor(firm), data = sample)
the data looks like:

Dear all,
I wanted to ask if I use the correct function to set-up the model for a did:
did=time*treated
didreg = lm(y ~ time + treated+ did + x + factor(year) + factor(firm), data = sample)
the data looks like:

I think yes. See more here: https://www.princeton.edu/~otorres/DID101R.pdf
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.