I am wondering why my fixed effects regression does not work.
My Code is the following:
sfeL=felm(sätzegesp~TTRverf,spieler|0|0, data=datregT)
sätzegesp
is a vector if numbers, TTRverf
is a dummy-variable and the fixed effect variable spieler
is a vector of numbers indicating the ID of each person.
Unfortunately, I get the error
operators are only possible for numeric, logical or complex types
I am not familiar with felm()
, but usually we use something like y ~ x1 + x2 + .. + xn
as formula, not y ~ x1, x2, ... xn
. That might be the problem. You can see it in exampes in the documentation of the lfe package here.
So try to use
sfeL <- felm(sätzegesp ~ TTRverf + spieler|0|0, data= datregT)