glm.normalized.ratio.index: (Generalised) Linear models from normalised ratio indices

glm.nriR Documentation

(Generalised) Linear models from normalised ratio indices

Description

Build (generalised) linear models of normalised ratio indices as response and predictor variables usually stored in the SI.

Usage

lm.nri(formula, preddata = NULL, ...)
glm.nri(formula, preddata = NULL, ...)

Arguments

formula

Formula for (generalized) linear model

preddata

Data frame or speclib containing predictor variables

...

Further arguments passed to lm, glm and generic print.default

Details

NRI-values may be used as predictor or response variable. If NRI-values are predictors, the models are build only with one index as predictor instead of all available indices. In this case, only one predictor and one response variable is currently allowed. See help pages for lm and glm for any additional information. Note that this function does not store the entire information returned from a normal (g)lm-model. To get full (g)lm-models use either the function nri_best_performance to return best performing model(s) or extract nri-values with getNRI and build directly the model from respective index.

See details in Nri-plot-method for information about plotting.

Value

The function returns an object of class Nri. The list in the slot multivariate contains the new (g)lm information which depends on the kind of model which is applied:

  1. lm.nri: The list contains the following items:

    • Estimate: Coefficient estimates for each index and term

    • Std.Error: Standard errors

    • t.value: T-values

    • p.value: P-values

    • r.squared: R^2 values

  2. glm.nri: The list contains the following items (depending on formula used):

    • Estimate: Coefficient estimates for each index and term

    • Std.Error: Standard errors

    • t.value/z.value: T-values or Z-values

    • p.value: P-values

Author(s)

Lukas Lehnert

See Also

plot, lm, glm, getNRI

Examples

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)

glmnri <- glm.nri(nri_WV ~ chlorophyll, preddata = spec_WV)
glmnri

plot(glmnri)

hsdar documentation built on March 18, 2022, 6:35 p.m.