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 explain the meaning of the coefficient of interest of Difference-in-Differences?Considering a Difference-in-Differences (DiD) equation with a dummy variable: yi=α+βDi+Xit+εi. W…
to account for clustering or not to account for clustering?I’m doing an analysis of applicants for grants over several years. In a given year, duplicate people…
How to use the "replace" option with xls2dta commandHi All, I used the following command to import several Excel sheets into a dta file. It worked well…
2SLS when the first stage is probit model for panel data!Dear statalists, I am very new to STATA and trying to use 2SLS when the IV is a binary variable. I h…
How to read non-collinear factor variables into mataI want to read factor variables into mata and omit the base level from the resulting matrix. The cod…
Subscribe to:
Post Comments (Atom)
0 Response to how to separate the result by region
Post a Comment