discorr: Construct Distance and Correlation Matrices

Description Usage Arguments Details Value References

Description

discorr is used to construct the distance and correlation matrices needed to estimate range, organization, and strength.

Usage

1
2
3
discorr(df, longlat = FALSE, ctype = "single1")

pwc(x1, x2, ctype)

Arguments

df

a fema-class data.frame.

longlat

logical indicating whether coordinates are projected. Default is FALSE.

ctype

a string indicating the type of correlation to be caluclated. Valid options include single1 (cosine similarity for a single slope), single2 (linear similarity for a single slope), and multi (square root of the sum of squared differences across multiple slopes).

x1

a vector of slopes associated with observation i.

x2

a vector of slopes associated with observation j.

Details

discorr is used to generate distance and correlation matrices that can then be summarized in terms of range, organization, and strength. pwc calculates pairwise correlations using the methods outlined by Martin, Slez, and Borkenhagen (2016).

Value

The function discorr returns the following list of objects:

coords

matrix of coordinates.

slopes

vectors of slopes.

longlat

logical indicating whether coordinates are projected.

dmat

the distance matrix.

rmat

the correlation matrix.

References

Martin, J.L., Slez, A., and Borkenhagen, C. 2016. "Some Provisional Techniques for Quantifying the Degree of Field Effect in Social Data."


aslez/femaR documentation built on May 12, 2019, 5:36 a.m.