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.
Related Posts with Generate a new variable in a loop in different files and calculating the mean
Summary stats for panel dataI have the following dataset from years 2000-2010. Code: * Example generated by -dataex-. To insta…
summing up total number of eventsIn a prospective study with 336 patients, I have a variable "number_of_events_since_operation". It c…
Confidence Interval around estat sbsingleI have used estat sbsingle to find a structual break around an unknown date. The command found here …
-groups- by functionHello I want to list the "top 10" causes of death by age group. The -groups- command works nicely f…
Estimating confidence intervals of the cumulative structural impulse–response functionsHello, I have estimated csirf following the instructions from this post: https://blog.stata.com/201…
Subscribe to:
Post Comments (Atom)
0 Response to Generate a new variable in a loop in different files and calculating the mean
Post a Comment