I have a dataset which contains areas covered by different landuse variables such as agriculture, forest, grassland etc for different spatial scales. The spatial scales that I have used are

  1. 30 m riparian scale = P
  2. 15 km riparian scale = Q
  3. 30 km riparian scale = R
  4. 30 km ring scale = S
  5. Whole watershed = T

The landuse variables are : Ag, For, Urb, Grs and Oth which refers to agriculture, forest, urban, grassland and others respectively. PAR, Temp and Elevation are other variables affecting productivity. I want to know

  • what kind of landuse classification is the best to understand factors affecting productivity in rivers
  • which landuse variable affects productivity in which spatial scale

This is how my data looks like

The actual dataset has 102 observations with 30 variables. I am currently using "glmulti" package in R for automated variable selection. The program is still running because I have 2^n i.e. 2^30 models to run.

Currently the best model is something like this:

GPPC ~ 1 + Temp + PFor + QAg + QFor + QUrb + RAg + RFor + RGrs + RUrb + ROth

But, rather than this, I would like the variable selection to include each of the landuse variable only once, for example,

GPPC ~ 1 + Temp + PAg + RFor + RUrb + SGrs + SOth

Arranging my data like this

Is there any way to perform automated analysis and get results like this?

I thought of arranging my data like this.

Alternative way I could arrange my data

But then I couldn't incorporate the "Class" i.e. spatial scale in the model.

Note: I have already used MuMin package and used dredge function but it took a very long time to process it. I could also select few variables using PCA but due to the nature of my analysis, I would like to use all the variables in a single model.

  • $\begingroup$ If you have to build $2^30$ models then you are screwed, that's not going to happen. Anyway, this looks like a job for LASSO regression, it's main purpose is feature selection and it does so much quicker. If you have some groups of variables (for ex. landuse) of which you want to select only one of them, then take a look at GROUP LASSO. $\endgroup$ – user2974951 Jan 9 at 8:10
  • $\begingroup$ @user2974951 Thanks for your suggestion. I will try giving LASSO regression a shot. $\endgroup$ – Ana Jan 10 at 1:26

What I get from the OPs question is that they want to identify important relationships between variables. Given the number of tests you would have to go about, if approaching this from an inferential framework, you will have a very high type II error which you would need to correct for to prevent p-hacking; correction comes with its own issues though.

If you are interested in identifying important relationships between variables, and understanding if these vary with spatial scale, then I would suggest you run a PCA on your data, arranged just how you have it - excluding class. From here you can then conduct a PERMANOVA on the PCA object to determine which variables differ, and how, between the land-use classes. You might need to build a separate one for each spatial scale, especially if variables are not standardised. The vegan package can do all this and you could easily produce some nice descriptive plots to show your findings.

Also, I wouldn't personally use Lasso, ridge or elastic net regression in this case. These are fine if the aim of the exercise is to create a model that predicts data well, as these approaches restrict coefficients to prevent the model from fitting noise, but it sounds like you are more interested in identifying relationships. If I am wrong about that though you could also explore random forests.

  • $\begingroup$ Hmmm. Ok. I will give it a try and will get back to you again. Thanks for the suggestion! $\endgroup$ – Ana Jan 10 at 1:30
  • $\begingroup$ No worries, just to clarify: any kind of variable selection, unless you are doing so with the intent of determining the model with the greatest predictive power, is akin to a fishing expedition. If prediction is your only goal, then by all means go for regression techniques or it's analogs. $\endgroup$ – André.B Jan 10 at 2:26

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.