I would like some advice on how to approach finding the best explanatory variables for a response, given my responses are clustered geographically in cities as well as some of my explanatory variables.

I have a dataset that is made up of individual sites across multiple cities. I have around 4000 sites across 130 cities. I have 10 explanatory variables that describe the land cover around those sites. I also have 15 explanatory variables at the city level, for example, GDP per population, landcover across the entire city, and then each city is based in a continent/biome/realm/etc with a latitude and longitude.

I plan to use random forest models to select the best explanatory variables for my response variable. I will use an approach defined by Genuer et al. (2010) that I have prior experience of using.

I think I have two ways of modeling this,

1) I could do

response ~ site-level explanatory variables + site lat long + city as a random effect

It has then been suggested that I could then use the slopes of the random effect as a response variable, e.g.

random variable slope ~ city level explanatory variables + continent + biome + realm + city lat long

2) Or I could model with all the explanatory variables

response ~ site level explanatory variables + city level explanatory variables + continent + biome + realm + lat + long

I would like to answer two questions:

(1) are city explanatory or site explanatory variables more important for explaining my response?

(2) how local explanatory variables change with the different city explanatory variables?

Is there an obvious answer to the approach I should use? If not, what sorts of questions do I need to answer to decide on the approach? Is there any recommended reading/papers I should read?

Thank you for any input.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.