CohenD: Calculate Cohen's cumulative distance

Description Usage Arguments Details Value References See Also Examples

View source: R/CohenD.R

Description

Calculate Cohen's cumulative distance metric for a population matrix projection model.

Usage

1

Arguments

A

a square, irreducible, non-negative numeric matrix of any dimension.

vector

a numeric vector or one-column matrix describing the age/stage distribution used to calculate the distance.

Details

Calculates the cumulative distance metric as outlined in Cohen (1979). Will not work for reducible matrices and returns a warning for imprimitive matrices (although will not function for imprimitive matrices with nonzero imaginary components in the dominant eigenpair).

Value

Cohen's D1.

References

See Also

Other DistanceMeasures: KeyfitzD(), projectionD()

Examples

1
2
3
4
5
6
7
8
  # Create a 3x3 PPM
  ( A <- matrix(c(0,1,2,0.5,0.1,0,0,0.6,0.6), byrow=TRUE, ncol=3) )

  # Create an initial stage structure
  ( initial <- c(1,3,2) )

  # Calculate Cohen cumulative distance
  CohenD(A, vector=initial)

popdemo documentation built on Nov. 16, 2021, 5:06 p.m.