regdistdiffone {prabclus} | R Documentation |
Regression difference within reference group and between-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 (a) the within-group
distances of the reference group rgroup
and (b) these together
with the between-group distances.
Usage
regdistdiffone(x,dmx,dmy,grouping,xcenter=0,xcenterbetween=0,rgroup)
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
|
rgroup |
one of the values of |
Value
Difference between
standard least squares regression predictions for the two regressions 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))
regdistdiffone(rep(TRUE,35),ver.geo,vei$distmat,grouping=species,
xcenter=0,xcenterbetween=100,rgroup=2)