Sunday, September 29, 2019

Generate a new variable in a loop in different files and calculating the mean

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.

No comments:

Post a Comment