Best performing model(s) with NRI

Share:

Description

Get or mark best performing model(s) between narrow band indices and environmental variables

Usage

1
2
3
4
5
nri_best_performance(nri, n = 1, coefficient = "p.value", 
                     predictor = 2, abs = FALSE, findMax = FALSE, 
                     ...)
mark_nri_best_performance(best, glmnri, n = nrow(best$Indices), 
                          uppertriang = FALSE, ...)

Arguments

nri

Object of class nri

glmnri

Object of class glmnri

n

Number of models to return or mark

coefficient

Name or index of coefficient to plot

predictor

Name or index of term to plot

abs

Use absolute value (e.g. for t-values)

findMax

Find maximum or minimum values

best

Output from nri_best_performance

uppertriang

Flag to mark the upper triangle

...

Further arguments passed to glm function. These must be the same as used for initial creation of glm.nri. For mark_nri_best_performance arguments are passed to polygon.

Details

See details in glm.nri and glm.

Author(s)

Lukas Lehnert

See Also

glm.nri, glm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.