I have a number of variables. the variables are insurance types, a region of address, and another 5 years age group.
I want to generate a mean of the holder of specific insurance types detailed separated for each region then separated again for each age group.
I have tried this:
foreach var in Employer_Insurance Private_Insurance Other_Insurance {
mean `var' [iw=weight_value/1000000]
mean `var' [iw=weight_value/1000000], over(age_group)}
But I don't know how to separate the result by region of address. please fix my codes.
Thanks in advance for any help
Henggar
Related Posts with how to separate the result by region
How to Clean String variable with errors in data entryHi Stata Forum, I am a relatively new user to STATA. I am working on a project that uses data scrap…
Using Reshape to sort wide into longHello Everyone, I want to convert my wide data into a long panel data for currency data. Currently…
How to flag observations that are repeated after a pre-specified length of time?Hi, Please consider this example data: Code: * Example generated by -dataex-. To install: ssc inst…
Using loop to replace values in a variableDear All, I am new to loop. Is there a way I can replace the missing values with the number 1 each …
Is adoupdate, update stallig for anyone else? Advice/For the first time, I'm having trouble with adoupdate, update today. It goes through identifying wha…
Subscribe to:
Post Comments (Atom)
0 Response to how to separate the result by region
Post a Comment