I have a data set “Customer” having four variables, Customer_ID, Gender, Marital_Status and Age. In this data set, variable Age has some missing values. Now I want to replace these missing values with the average Age of non-missing observations. I want to calculate average age by Gender and Marital status.
Below I have provided the snapshot of data set, Please help to solve this.
Customer_ID Gender Marital_Status Age C00123 M M 35 C00124 F M 23 C00125 M S 24 C00126 M M 32 C00127 M S . C00128 F M . C00129 M M 36 C00130 F S 23 C00131 M M . C00132 M S .