I am doing emmeans analysis for my bachelors thesis. I am analysing households incomes based on different variables like education, number of children, job sector, area ect.
The question is: Is there a way to merge eg. multiple living areas into one, as they have basically the same mmean and then construct the GLM again?
In SAS I would use this code to merge 3 areas into one: ESTIMATE "BB-KE-ZA" intercept 3 REGION 1 1 0 0 0 0 1 /divisor=3;
and I wish to do the same in R.
I wish to create new value of the variable Region where will be merged 3 values of the variable Region that have same least square means.