# Choosing method for comparing peoples salaries

#### heber

##### New Member
I just came to the sad conclusion that I have not been maintaining my statistical skills enough the last years, and therefore I must kindly ask for help in this easy question:

How to find standard deviations from variable A for individuals in a group adjusted for effect of variable B?

I have a data-set with one variable "Name", one variable "Salary" and one variable "Seniority". I would like to compute standard deviation per individual to find out if they have their "rightful" salary compared to the rest of the group, but I also have to take into account that seniority (linear) is supposed to affect the salary.

All clues and hints will be highly appreciated!

Last edited:

#### hlsmith

##### Less is more. Stay pure. Stay poor.
Are salaries skewed and need to be log-transformed - this is usually common with salary data I believe. How many people do you have data for?

#### heber

##### New Member
Thank you for fast response!
Skewness for "Salary" is 0.07
n=150

#### hlsmith

##### Less is more. Stay pure. Stay poor.
Well you would likely try to fit a linear model and also explore non-linear models (general additive models) if assumptions aren't met. Then you could interpolate values from it to see what the model estimated, per observed data on seniority. So I guess you just have a simple linear regression to start with, unless under "Name" you have groupings not just individual people.

#### heber

##### New Member
I have groupings, but seniority should be given different importance for different groups, so I think it is better to compute each group separately.
Thank you for your help, I will try your solution!