Plots for within-groups and between-groups distance regression
Visualisation of various regressions on distance (or dissimilarity) data where objects are from two groups.
plotdistreg(dmx,dmy,grouping,groups=levels(as.factor(grouping))[1:2], cols=c(1,2,3,4), pchs=rep(1,3), ltys=c(1,2,1,2), individual=TRUE,jointwithin=TRUE,jointall=TRUE, oneplusjoint=TRUE,jittering=TRUE,bcenterline=TRUE, xlim=NULL,ylim=NULL,xlab="geographical distance", ylab="genetic distance",...)
dmx |
dissimilarity matrix or object of class
|
dmy |
dissimilarity matrix or object of class
|
grouping |
something that can be coerced into a factor,
defining the grouping of
objects represented by the dissimilarities |
groups |
Vector of two levels. The two groups defining the
regressions to be compared in the test. These can be
factor levels, integer numbers, or strings, depending on the entries
of |
cols |
vector of four colors (or color numbers) to be used for
plotting distances
and regression lines within the first group, within the second group,
distances between groups, and a line marking the center of the
between-groups explanatory distances, see |
pchs |
vector of three plot symbols (or numbers) to be used for
plotting distances within the first group, within the second group,
and distances between groups, see |
ltys |
vector of line type numbers to be used for single group
within-group regression, both groups combined within-group
regression, regression with all distances, and regression combining
within-groups distances of one group with between-groups distances,
see |
individual |
if |
jointwithin |
if |
jointall |
if |
oneplusjoint |
if |
jittering |
if |
bcenterline |
if |
xlim |
to be passed on to |
ylim |
to be passed on to |
xlab |
to be passed on to |
ylab |
to be passed on to |
... |
optional arguments to be passed on to |
Hausdorf, B. and Hennig, C. (2019) Species delimitation and geography. Submitted.
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)) loggeo <- log(ver.geo+quantile(as.vector(as.dist(ver.geo)),0.25)) plotdistreg(dmx=loggeo,dmy=vei$distmat,grouping=species, jointwithin=FALSE,jointall=FALSE,groups=c(1,2)) legend(5,0.75,c("within species 1", "within species 2","species 1 and between","species 2 and between"),lty=c(1,1,2,2),col=c(1,2,1,2)) plotdistreg(dmx=loggeo,dmy=vei$distmat,grouping=species, jointwithin=TRUE,jointall=TRUE,oneplusjoint=FALSE,groups=c(1,2)) legend(5,0.75,c("within species 1", "within species 2","all distances","all within species"),lty=c(1,1,1,2),col=c(1,2,3,3))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.