How to get industry dummies in fixed effect model. I am using within effect.

  1. there'll be collinearity by adding the industry dummy, hence industry dummy will be dropped. no problem with the year dummy.

  2. Using random effect will solve the problem. however, hausman test indicate fixed effects is better.

3.The firm individual fixed effects have taken into account that there are differences among countries. However, we need to know the magnitude of the industry effect if fixed effects is used.

As you know, you can't have two complete sets of dummies. It also never makes any difference to anything in the regression which dummy is dropped. But if it is more convenient to see all the dummy coefficients for one factor, put it first in the formula.

lm(formula = y ~ -1 + x1 + x2)


lm(formula = y ~ -1 + x2 + x1)

Thanks for the response..

Can you please let me know the changes required in the coding below to get industry dummies in the output.
#Independent Variable


  •     Growth=pdata$Growth,NDTS=pdata$NDTS,Liquidity=pdata$Liquidity,
  •     GDP=pdata$GDP,Inflation=pdata$Infaltion,Age=pdata$Age,Age2=pdata$Age2,
  •     Mining_And_Construction=pdata$Mining.And.Construction,
  •     Trade_and_services=pdata$,
  •     Information_and_Communication=pdata$Information.And.Communication,
  •     Manufacturing=pdata$Manufacturing,Misc=pdata$Misc.,
  •     Professional_Services=pdata$

#Fixed effect
#Fixed Effect
fmethod=plm(y~-1+x,model="within", data = pdata)

I am receiving industry dummies using between instead of within. Is it correct?

  1. fmethod=plm(y~x,model="within", data = pdata)
    Using this code I am not getting industry dummy coefficient and constant coefficient value. Is this because of demeaned approach that individual effect being eliminated. Is it correct to report results without industry dummies in fixed effect model and similarly in GMM difference approach?