XGboost with group-specific and individual-specific data My dataset consists of a combination of two databases. One database consists of individual-level data on the characteristics and compensation of the top five executive officers of big American companies. The second database consists of balance sheet information on the companies of these executives. I use 4 individual-specific variables (e.g. executive age) from the first database and about 15 to 20 company-specific variables from the second database (e.g. total company profit). This means that for executives of the same company, only 4 variables are unique to the specific executive and all company-specific variables are the exact same for all 5 executives. I want to use XGboost to predict executive compensation using these individual-specific and company-specific variables. Is it okay to use 5 executives from the same company or should I use only 1 executive (CEO) for each company? This would decrease the sample size from 8926 to 1703 observations, but it would ensure that all of my observations are truly “unique”. Thank you very much!
You can use all executives if you believe their compensation is governed by the same function. That is, all things equal, you expect all executives to have equal pay.
If not, perhaps you should add a feature that tells the function of each executive (CEO, CFO...).
Anyhow, the fact that part of the features is the same for multiple examples is not a problem.
It would be a problem if you had very many examples from one company and you're looking for a model that applies to all companies. If you used loads of examples of one company, your model would be biased towards the pay at that company, but since you have 5 from each company, I don't see the problem.