Hi,

I want to write a loop to generate a new variable called savings (income-expenditure) in two separate files. Use sample weights with name wht to calculate its mean in respective files. Then a combined mean of the means. How can we do it via loops?

Any help is appreciated.