Dear All
I am new to the group and I would like to know how can we use loop to replace missing value of the different food item with the median value of the food item within a PSU. If I use "replace" I have to type the command 132 times since there are 132 items.
Please advise if there is an easier way to do
I wanted to attach my dataset but the attachment does not allow me to do. In my data set there is a variable called "missing" which identifies the six HH with missing info for all food items, For these HH I want to replace the values of each item by the median value of the item within that PSU. The item names are fexp_1111, fexp_1112........till fexp_2232
The names of the PSU with missing info are :
Thank you in advance. If there is way where we can upload the STATA dataset please let me know.
I am new to the group and I would like to know how can we use loop to replace missing value of the different food item with the median value of the food item within a PSU. If I use "replace" I have to type the command 132 times since there are 132 items.
Please advise if there is an easier way to do
I wanted to attach my dataset but the attachment does not allow me to do. In my data set there is a variable called "missing" which identifies the six HH with missing info for all food items, For these HH I want to replace the values of each item by the median value of the item within that PSU. The item names are fexp_1111, fexp_1112........till fexp_2232
The names of the PSU with missing info are :
1510506 |
2040002 |
7080001 |
10030003 |
11510404 |
17020003 |
Comment