Hi everyone,
for my panel data set that's unit of analysis is countries, I am trying to create variables that describe information of contiguous countries. I.e., I want a variable that indicates the average GDP of each of the countries' contiguous neighbors. As an example, speaking for an individual observation, i want the variable to show: what is the average GDP of all of Germany's neighboring countries in year 2000? How do I create this variable?
I was adviced to look at spatial lagging but as far as I have understood, the concept of spatial lags uses longitudes and latitudes and then sets a threshold as of with which distance, a country is considered a neighbor. As I only care about contiguous neighbors though, I don't see how spatial lagging would help me here.
I would be very happy about some advice. Thank you in advance!
for my panel data set that's unit of analysis is countries, I am trying to create variables that describe information of contiguous countries. I.e., I want a variable that indicates the average GDP of each of the countries' contiguous neighbors. As an example, speaking for an individual observation, i want the variable to show: what is the average GDP of all of Germany's neighboring countries in year 2000? How do I create this variable?
I was adviced to look at spatial lagging but as far as I have understood, the concept of spatial lags uses longitudes and latitudes and then sets a threshold as of with which distance, a country is considered a neighbor. As I only care about contiguous neighbors though, I don't see how spatial lagging would help me here.
I would be very happy about some advice. Thank you in advance!
Comment