Time fixed-effects with felm function in R I'm using the felm function in R for time-fixed effects but I'm having trouble specifying my model.
I tried the following two but they result into completely different outputs. Could you explain what does the 0 stand for? Which of the following models would be correct for my analysis? My sample consists of 400 observations (40 countries over 10 years).
model_1 <- felm(y ~ x1 + x2 + x3 | year | 0 | year, data = df)

model_2 <- felm(y ~ x1 + x2 + x3 | year, data = df)

I would really appreciate some advice on this, thank you!

In lfe::felm we may specify fixed effects, instruments, and cluster, e.g.
y ~ x1 + x2 | f1 + f2 | (Q|W ~ x3+x4) | clu1 + clu2 

The 0 indicates that you do not want to specify anything.
So in
model_1 <- felm(y ~ x1 + x2 + x3 | year | 0 | year, data = df)

you specified year fixed effects and standard errors clustered by year,
whereas in
model_2 <- felm(y ~ x1 + x2 + x3 | year, data = df)

you specified just the year fixed effects.
Note: Read Details section in ?lfe::felm.
