normalized.ratio.index.best.perfomance: Best performing model(s) with NRI

Description Usage Arguments Details Author(s) See Also Examples

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)

Example output

Loading required package: raster
Loading required package: sp
Loading required package: rgdal
rgdal: version: 1.5-18, (SVN revision 1082)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 3.0.4, released 2020/01/28
Path to GDAL shared files: /usr/share/gdal
GDAL binary built with GEOS: TRUE 
Loaded PROJ runtime: Rel. 6.3.1, February 10th, 2020, [PJ_VERSION: 631]
Path to PROJ shared files: /usr/share/proj
Linking to sp version:1.4-4
To mute warnings of possible GDAL/OSR exportToProj4() degradation,
use options("rgdal_show_exportToProj4_warnings"="none") before loading rgdal.
Loading required package: signal

Attaching package:signalThe following object is masked frompackage:raster:

    resample

The following objects are masked frompackage:stats:

    filter, poly

Loading required package: caret
Loading required package: lattice
Loading required package: ggplot2
Loading required package: Boruta

###################################
  This is hsdar 1.0.3
  To get citation entry type
      'citation("hsdar")'
###################################

Attaching package:hsdarThe following object is masked frompackage:raster:

    nbands

hsdar documentation built on Aug. 4, 2020, 5:06 p.m.