Hi,
I have a dataset with an income variable reported at 5 different time points (5 waves of data in the format shown below – each respondent corresponds to a row, and each column reflects income for a specific year).
These variables all have missing values, and I want to build a mean of them (5-year mean income), which should only draw from the years for which the respondent does not have missing data. In the example below, respondent 1 would have a mean based on 3 years of data, while respondent 2 would have a mean based on 3 years of data, and respondent 3 would have a mean based on 4 years of data).
My current problem is that having one missing value makes the generated mean variable entirely missing.
I would not like to treat the missingness as zero (as I don’t know what their income was on that year), but rather calculate the mean income based on the non-missing values.
I would appreciate advice on this, thank you so much in advance!
I have a dataset with an income variable reported at 5 different time points (5 waves of data in the format shown below – each respondent corresponds to a row, and each column reflects income for a specific year).
These variables all have missing values, and I want to build a mean of them (5-year mean income), which should only draw from the years for which the respondent does not have missing data. In the example below, respondent 1 would have a mean based on 3 years of data, while respondent 2 would have a mean based on 3 years of data, and respondent 3 would have a mean based on 4 years of data).
My current problem is that having one missing value makes the generated mean variable entirely missing.
I would not like to treat the missingness as zero (as I don’t know what their income was on that year), but rather calculate the mean income based on the non-missing values.
I would appreciate advice on this, thank you so much in advance!
Income year 1 | Income year 2 | Income year 3 | Income year 4 | Income year 5 | |
ID1 | 40,000 | missing | 42,000 | 40,000 | missing |
ID2 | missing | missing | 32,000 | missing | 35,000 |
ID3 | 50,000 | 52,000 | missing | 54,000 | 55,000 |
Comment