Panel data with Sector year fixed effects on R

I am trying to replicate the following econometric equation from the paper "How do french manufacturing firms react to Energy shocks ?"

s denotes sectors,i denotes firms, and t denotes year. The paper uses panel data. As you see it has $$\phi_i$$ for firms fixed effects. I know how to implement such in R, I would use the following code:

model1 <- plm(log(Panel$$Prices)~ log(Panel$$Electricity.pricr)+log(Panel$Gaz.Price)+ data=Panel, index= c("Secteur","Date"), model="within",effect= "individual")  The command effect= "individual" enables me to have firm fixed effect. However the paper includes also sector-year fixed effects $$\chi_{st}$$. But I do not know how to implement a fixed effect that plays on two variable at the same time: s and t. Do you know how I could implement it in R ? Thank you • interaction(secteur, year) seems to do the job. It generates a factor. You can add it as a regressor. Mar 31 at 15:14 • Thank you, but how would you write that piece of code ? – BAL Mar 31 at 16:02 • model1 <- plm(log(Panel$Prices)~ log(Panel$Electricity.pricr)+log(Panel$Gaz.Price)+ interaction(Secteur, year), data=Panel, index= c("Secteur","Date"), model="within",effect= "individual") Apr 2 at 11:20
• Assuming you have a year variable Apr 2 at 11:20
• Do you have a complete reference of the paper (maybe a link)? It is not possible to find it easily. May 1 at 13:23

• Would it work just by adding +Panel$Date * Panel$Secteur in the regressor like this ? : plm(log(Panel$Prices)~ log(Panel$Electricity.price)+log(Panel$Gaz.Price)+ Panel$Date * Panel\$Sector, data=Panel, index= c("Sector","Date"), model="within",effect= "individual")