Learn R Programming

MigConnectivity (version 0.5.0)

calcNMC: Calculate NMC_XY, another type of migratory connectivity strength

Description

Provides simple calculation of NMC_XY (network migratory connectivity strength between seasons X and Y), NMCa_XY (abundance-weighted network migratory connectivity strength), and network migratory connectivity diversity (X node-specific version of NMC_XY) from point estimate of psi (transition probabilities) and originRelAbund (optional). Does not include measures of uncertainty.

Usage

calcNMC(psi, originRelAbund = NULL)

Value

calcNMC returns a list with elements:

NMC

scalar real value between 0 and 1, indicating the strength of network migratory connectivity

NMCpop

Vector of network migratory connectivity diversity values, also between 0 and 1, the X-node-specific version of NMC_XY

NMCa

If originRelAbund was entered, the results will include this, an abundance weighted measure of the strength of network migratory connectivity (also between 0 and 1). If originRelAbund was not entered, this will be left out

Arguments

psi

Matrix of transition probabilities

originRelAbund

(optional) Vector of relative (proportional) abundance at the origin sites. If entered, should sum to 1.

See Also

estNMC, calcMC, estMC

Examples

Run this code
nScenarios <- length(samplePsis)
NMC1 <- vector("list", nScenarios)
for (i in 1:nScenarios) {
  NMC1[[i]] <- calcNMC(samplePsis[[i]])
}
names(NMC1) <- names(samplePsis)
str(NMC1)

calcNMC(samplePsis[[7]], sampleOriginRelN[[2]])

Run the code above in your browser using DataLab