biv.test | R Documentation |
biv.plot
displays a bivariate plot.
biv.test
displays the results of a bivariate randomisation test.
biv.plot(dfxy, br = 10, points = TRUE, density = TRUE,
kernel = TRUE, o.include = FALSE, pch, cex, col, h, sub,
side = c("top", "bottom", "none"), ...)
biv.test(dfxy, point, br = 10, points = TRUE, density = TRUE,
kernel = TRUE, o.include = FALSE, pch, cex, col, Pcol, h, sub,
side = c("top", "bottom", "none"), ...)
dfxy |
a data frame with N lines (couples of values) and two columns |
br |
a parameter used to define the numbers of breaks of the histograms. A larger value leads to a larger number of breaks |
points |
logical. Whether the points should be displayed |
density |
logical. Whether the kernel density estimation should be displayed for the marginal histograms |
kernel |
logical. Whether the kernel density estimation should be displayed for the bivariate plot |
o.include |
logical. If |
pch |
plotting "character", i.e., symbol to use for the points. (see
|
cex |
character expansion for the points |
col |
color code or name for the points, see |
h |
vector of bandwidths for x and y directions, used in the
function |
sub |
a character string to be inserted in the plot as a title |
side |
if |
point |
a vector of length 2, representing the observation to be compared with the simulated values of the randomisation test |
Pcol |
color code or name for the observed point |
... |
further arguments passed to or from other methods |
biv.test
is used to display the results of a bivariate
randomisation test. An example of use of the function is provided in
the function niche.test
.
The x-axis of the main window corresponds to the first column of
dfxy
; the y-axis corresponds to the second column. Kernel
density is estimated to indicate the contours of the distribution of
randomised values. The two marginal histograms correspond to the
univariate tests on each axis, for which the p-values are computed with
as.randtest
(package ade4, one-sided tests).
biv.plot
and biv.test
use the function kde2d
of the
package MASS
.
Mathieu Basille basille@ase-research.org
as.randtest
(package ade4)
x = rnorm(1000,2)
y = 2*x+rnorm(1000,2)
dfxy = data.frame(x, y)
biv.plot(dfxy)
biv.plot(dfxy, points=FALSE, col="lightblue", br=20)
p = c(3, 4)
biv.test(dfxy, p)
biv.test(dfxy, p, points=FALSE, Pcol="darkred", col="lightblue", br=20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.