2 years ago

#48142

test-img

BC31

Consolidation of similar characteristics in one column - rename function - industry fixed effects

I am currently doing difference in difference analysis in R and need to incorporate industry fixed effects. Overall, I can categorise my industries by factor(df$Industry) & levels(df$Industry) and then add them to my regression as a factor (industry). I have a data set where there are 70 different industries in one column. I want to combine these into 10 industries. Unfortunately I don't know the right code and everything I have tried doesn't work. I also know how to map the 70 to the 11 industries. I just don't have a function that allows me to refer to one column in the data set and then rename the other industries to the standard 10 industries. Does anyone know anything about this? That would help me a lot. Thank you very much in advance.

r

rename

consolidation

0 Answers

Your Answer

Accepted video resources