local_depths {pald}R Documentation

Local (Community) Depths

Description

Creates a vector of local depths from a matrix of distances (or dist object).

Usage

local_depths(d)

Arguments

d

A matrix of pairwise distances, a dist object, or a cohesion_matrix object.

Details

Local depth is an interpretable probability which reflects aspects of relative position and centrality via distance comparisons (i.e., d(z, x) < d(z, y)).

The average of the local depth values is always 1/2. Cohesion is partitioned local depth (see cohesion_matrix); the row-sums of the cohesion matrix are the values of local depth.

Value

A vector of local depths.

Examples


D <- dist(exdata1)
local_depths(D)
C <- cohesion_matrix(D)
local_depths(C)

## local depths are the row sums of the cohesion matrix
rowSums(C)

## cognate distance data

ld_lang <- sort(local_depths(cognate_dist))

[Package pald version 0.0.4 Index]