Hello,
I am working with the World Values Survey to run mixed-effects models in Stata 17. My unit of analysis is the individual person. There are individuals from about 100 countries. Within each country, different individuals were surveyed in different years. I want to (1) re-run the following code separately for each country in the dataset, and (2) create a new country-level variable that is the coefficient for the effect of age in each country.
The following statsby command does not work for this purpose because when I try this command, I get the r(101) error message that “pweights are not supported by statsby.”
Are they any steps you can recommend?
Thanks!
Louisa
I am working with the World Values Survey to run mixed-effects models in Stata 17. My unit of analysis is the individual person. There are individuals from about 100 countries. Within each country, different individuals were surveyed in different years. I want to (1) re-run the following code separately for each country in the dataset, and (2) create a new country-level variable that is the coefficient for the effect of age in each country.
Code:
mixed rell age [pw=S017] if country==”United Kingdom” || year:
Code:
statsby _b, by(country): mixed rell age [pw=S017] || year:
Thanks!
Louisa

Comment