Hello, I have a specific set of values which I need to impute upon that are dependent on other variables. for example, I have a variable that is missing for subjects (lets call it var1), and they have values of var2, var3, var4, var5, var6, var7 and var8 present. I want to impute the mean of those 7 variables((aka var1+var2+.../n where n = the number of variables present)) into var1 when ONLY var1 is missing. I want to do this for each other variable as well, when all the other variables are present (so if ONLY var2 is missing, or ONLY var3 is missing). then, I want to do the same when there are 2 missing but 6 are present, for all combinations (var1, var2 missing, rest present and so on, using the mean as described above but using 6), and then doing the same for when there are combinations of three missing variables. is there a way to do this using a do loop? I assume there must be, but I don't know how to do it. If anyone can assist, I would appreciate it!
... View more