| regdistdiff {prabclus} | R Documentation |
Regression difference between within-group dissimilarities
Description
Given two dissimilarity matrices dmx and dmy, an indicator
vector x and a grouping, this computes the difference between
standard least squares regression predictions at point
xcenterbetween. The regressions are based on the dissimilarities
in dmx vs. dmy for objects indicated in
x. grouping indicates the two groups, and the difference
is computed between regressions based on the within-group distances of
the two groups.
Usage
regdistdiff(x,dmx,dmy,grouping,xcenter=0,xcenterbetween=0)
Arguments
x |
vector of logicals of length of the number of objects on which
dissimilarities |
dmx |
dissimilarity matrix or object of class
|
dmy |
dissimilarity matrix or object of class
|
grouping |
vector of length of the number of objects on which
dissimilarities |
xcenter |
numeric. Dissimilarities |
xcenterbetween |
numeric. This specifies the x- (dissimilarity)
value at which predictions from the two regressions are
compared. Note that this is interpreted as after centering by
|
Value
Difference between
standard least squares regression predictions for the two groups at point
xcenterbetween.
Author(s)
Christian Hennig christian.hennig@unibo.it https://www.unibo.it/sitoweb/christian.hennig/en
References
Hausdorf, B. and Hennig, C. (2019) Species delimitation and geography. Submitted.
See Also
Examples
options(digits=4)
data(veronica)
ver.geo <- coord2dist(coordmatrix=veronica.coord[173:207,],file.format="decimal2")
vei <- prabinit(prabmatrix=veronica[173:207,],distance="jaccard")
species <-c(rep(1,13),rep(2,22))
regdistdiff(rep(TRUE,35),ver.geo,vei$distmat,grouping=species,xcenter=0,xcenterbetween=100)