Hi,
I am attempting to estimate food security levels (individual responses from survey data) while my primary variables of interest are measured at the level of a 50km x 50km grid. Specifically, these variables at the grid level are: percent of each grid that has cell phone coverage and a dummy for whether the grid experienced riots. My survey covers individuals across 36 countries. Further, I have a measure of number of riots at the country level, which I would like to interact with the grid level measure of cell phone coverage (with the idea that the effect of a riot occurring somewhere else in the country may have an differential effect on food outcomes if the grid is more "connected").
My data includes individual controls (gender and number of adults provided in the sample below), and grid level variables are constant for all individuals in the grid, and finally, the country riots measure is constant for all ind in the country. Here is a sample of my data where gid2014_dum is a dummy for whether riots occurred in a grid and percentage is the % of the grid with coverage.
Given the nesting of individuals within grids and grids within countries, I want to estimate a multi-level model where I include the following variables from each level:
Individual: gender num_adult
Grid: Coverage%, riot dummy, other controls (agricultural land, night lights, etc.0
Country: Country riots
Would the correct specification be:
mixed Y gender num_adult || country: country riots || grid: coverage riot dummy other grid controls
or do the variables all enter as fixed effects with a random intercept for each country/grid?
mixed Y gender num_adult coverage riot dummy other grid controls country riots || country: || grid:
Thank You.
I am attempting to estimate food security levels (individual responses from survey data) while my primary variables of interest are measured at the level of a 50km x 50km grid. Specifically, these variables at the grid level are: percent of each grid that has cell phone coverage and a dummy for whether the grid experienced riots. My survey covers individuals across 36 countries. Further, I have a measure of number of riots at the country level, which I would like to interact with the grid level measure of cell phone coverage (with the idea that the effect of a riot occurring somewhere else in the country may have an differential effect on food outcomes if the grid is more "connected").
My data includes individual controls (gender and number of adults provided in the sample below), and grid level variables are constant for all individuals in the grid, and finally, the country riots measure is constant for all ind in the country. Here is a sample of my data where gid2014_dum is a dummy for whether riots occurred in a grid and percentage is the % of the grid with coverage.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str7 respno byte(gender num_adult) float gid2014_dum double percentage float total_country "ALG1166" 2 6 0 99.99999996 569 "ALG1167" 1 3 0 99.99999996 569 "ALG1168" 2 4 0 99.99999996 569 "ALG0369" 1 5 0 99.99999996 569 "ALG0370" 2 6 0 99.99999996 569 "ALG0371" 1 8 0 99.99999996 569 end
Individual: gender num_adult
Grid: Coverage%, riot dummy, other controls (agricultural land, night lights, etc.0
Country: Country riots
Would the correct specification be:
mixed Y gender num_adult || country: country riots || grid: coverage riot dummy other grid controls
or do the variables all enter as fixed effects with a random intercept for each country/grid?
mixed Y gender num_adult coverage riot dummy other grid controls country riots || country: || grid:
Thank You.
Comment