Hello everyone,
I’m trying to replicate the “WVS 5” country fixed effects model (Bayerl & Best, 2018) with newer data: Array
However, I’m really struggling with the country fixed effects model. The dependent variable is “environmental consciousness” (envgro; a dummy that is either 1 or 0) and the observations are nested in countries (B_COUNTRY). How am I supposed to code this in Stata?
So far I’ve tried two things. First I tried allocating dummies to all the countries with the command below – however it didn’t work, Stata simply never stopped trying to compute this:
xtmelogit envgro oecd gdpgrowth c.C_gdp10000##c.postmat relinc gender C_agedec age2 i.B_COUNTRY || B_COUNTRY:
I also couldn’t do it like this:
xtset B_COUNTRY
xtreg envgro c.C_gdp10000##c.postmat relinc gender C_agedec age2 || B_COUNTRY: (I removed the variables oecd and gdpgrowth as they don’t differ within countries)
It also didn’t work and gave me various error messages and never stopped computing either.
The dataset has around 65k observations which are nested in 45 countries, so it shouldn't really be too big to compute.
Does anyone have an idea what I could be doing wrong? Grateful for any responses!
Related Posts with Country fixed effects multilevel analysis not working
ElasticitiesHello, I would like to estimate the exports elasticity and the imports elasticity of some countries…
Storing the value of a variable from one observation in a local macro or scalarDear Statalist, I'm using Stata 16.0 trying to store a variable value from one observation in a loc…
Would constant annual variables across firms in a year be fully absorbed by the year dummy?Hi all, I am running the following regression using reghdfe written by @Sergio Correia: reghdfe f.D…
Collapse variables by country, category, yearHi! I have the following data (dataex below) and I just want to confirm if I am doing the right app…
bysort queryHello, I am trying to use bys to generate sequential and total number of Lines of treatments by pati…
Subscribe to:
Post Comments (Atom)
0 Response to Country fixed effects multilevel analysis not working
Post a Comment