I have a dataset of salary and demographic data. I want to perform a regression analysis to determine if demographic factors (age, sex, orientation etc) influence an individual's salary.
Within this dataset there are many different departments, and the average salary across departments varies. I want to control for this in my analysis so the department one is in is not considered.
I thought about normalizing salaries on a 0-1 scale within a department and using that as my dependent variable, but I am not sure if that is valid.
How should I go about this?