for my bachelor thesis, I research the effect of terrorism on economic growth.
my dependent variable is economic growth, my independent variables include investment growth rate and unemployment rate, my dummy variable is the succes of an attach, which gets a 1 if it succeeds and a 0 otherwise.
My paneldata consists of 27 European countries from the period 1995-2019.
My supervisor told me that I need to make the unemployment rate and investment rate into pre-determined variables, but I don't know how to do that in R.
My regression looks like this:
reg1 <- lm(gdpgr~unemp+invgr+success+factor(Country)+factor(Year), data=data)
gdpgr: gdp growth rate
unemp: unemployment rate
invgr: investment growth rate
success: success of the attack
and the rest includes country and time fixed effects.
Can someone help me?