Indicator.all.plusP: Calculated both the non and group-equalised IndVal for all...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/CorrelationIndex.R

Description

This function calculates the non and group-equalised versions of an habitat indicator value (IndVal) correlation De Cáceres and Legendre (2009).

Usage

1
2
3
4
5
6
7
8
9
Indicator.all.plusP(
  InDataframe,
  speciesbinary,
  weighted,
  group,
  numberIteration = 1000,
  SquareID = NULL,
  toroidal = FALSE
)

Arguments

InDataframe

dataframe - containing the data on species presence absence, habitat and weighting. It also optionally could contain location ID's.

speciesbinary

string - the name of the binary field within InDataframe that contains binary presence absence for a species at the location.

weighted

string - name of habitat weighting field. For example, proportion of habitat, but any weighting with all habitats at a location adding to 1.

group

string - ID of habitats or groups of interest.

numberIteration

Integer - optional - the number of permutation, set as 1000 by default.

SquareID

string - optional if non-weighted, but MUST be used if a weighting is used. ID of each location. Useful later for permutating the locations to calculate p-values.

toroidal

Boolean - If you suspect that your data is spatially auto-correlated you should use a toroidal permutation.

Details

It calculate p-values by permutation and therefore calculates take a bit of time.

Value

a custom class "CorIndexVar" containing all values which are the same for all habitats and don't need to be recalculated for every habitat. Including Nk, nk, the habitats "GroupDF", N, K, Ngp, nkoverNk ng & n. See De Cáceres and Legendre (2009). To this is added another custom class "Output" as $'result' which gives the habitat ID, I (non group-equalised IndVal) pI (the p-value for I), Ig (group-equalised IndVal) and Ig (the p-value for Ig). This "Output" class is the main result, the CorIndexVar is included as metadata of the input values.

Author(s)

Jordan Chetcuti

References

De Cáceres, M., & Legendre, P. (2009). Associations between species and groups of sites: indices and statistical inference. Ecology, 90(12), 3566–3574.

Chetcuti, J., Kunin, W. E. & Bullock, J. M. A weighting method to improve habitat association analysis: tested on British carabids. Ecography (Cop.). 42, 1395–1404 (2019).

See Also

PhiCor

Examples

1
2
3
4
    #Using the included dataframe Species1
    Species1_AllIndValvalues = Indicator.all.plusP(InDataframe = Species1, speciesbinary = "Species1", weighted = 'Proportion', group = 'HabId', SquareID = 'LocationID')
    names(Species1_AllIndValvalues)
    Species1_AllIndValvalues$`result`

Zabados/PhiCor documentation built on Oct. 9, 2021, 1:24 a.m.