data(spectral_data)
## Calculate all possible combinations for WorldView-2-8
spec_WV <- spectralResampling(spectral_data, "WorldView2-8",
response_function = FALSE)
nri_WV <- nri(spec_WV, recursive = TRUE)
## Build glm-models
glmnri <- glm.nri(nri_WV ~ chlorophyll, preddata = spec_WV)
## Return best 5 models
BM <- nri_best_performance(glmnri, n = 5, coefficient = "p.value")
## Get nri values for the 5 models
nri_BM <- getNRI(nri_WV, BM)
Run the code above in your browser using DataLab