Plot for kernel local significant difference regions

Share:

Description

Plot for kernel local significant difference regions for 1- to 3-dimensional data.

Usage

1
2
## S3 method for class 'kde.loctest'
plot(x, ...)

Arguments

x

an object of class kde.loctest (output from kde.local.test)

...

other graphics parameters:

lcol

colour for KDE curve (1-d)

col

vector of 2 colours. Default is c("purple", "darkgreen"). First colour: sample 1>sample 2, second colour: sample 1<sample2.

add

flag to add to current plot. Default is FALSE.

rugsize

height of rug-like plot (1-d)

add.legend

flag to add legend. Default is FALSE (1-d, 2-d).

pos.legend

position label for legend (1-d, 2-d)

add.contour

flag to add contour lines. Default is FALSE (2-d).

and those used in plot.kde

Details

For kde.loctest objects, the function headers are

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
   ## univariate
   plot(x, lcol, col, add=FALSE, xlab="x", ylab, rugsize, add.legend=TRUE, 
     pos.legend="topright", ...)
   
   ## bivariate
   plot(x, col, add=FALSE, xlab="x", ylab="y", add.contour=FALSE, 
     add.legend=TRUE, pos.legend="topright", ...)

   ## trivariate 
   plot(x, col, add=FALSE, xlab="x", ylab="y", zlab="z", box=TRUE, axes=TRUE,
     alphavec=c(0.5, 0.5), ...)
   

Value

Plots for 1-d and 2-d are sent to graphics window. Plot for 3-d is sent to RGL window.

See Also

kde.local.test

Examples

1
2
3
4
5
6
library(MASS)
data(crabs)
x1 <- crabs[crabs$sp=="B", c(4,6)]
x2 <- crabs[crabs$sp=="O", c(4,6)]
loct <- kde.local.test(x1=x1, x2=x2)
plot(loct)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.