plot.kde.loctest | R Documentation |
Plot for kernel local significant difference regions for 1- to 3-dimensional data.
## S3 method for class 'kde.loctest'
plot(x, ...)
x |
object of class |
... |
other graphics parameters:
and those used in |
For kde.loctest
objects, the function headers are
## univariate plot(x, lcol, col, add=FALSE, xlab="x", ylab, rugsize, add.legend=TRUE, pos.legend="topright", alpha=1, ...) ## bivariate plot(x, col, add=FALSE, add.legend=TRUE, pos.legend="topright", alpha=1, ...) ## trivariate plot(x, col, color, add=FALSE, box=TRUE, axes=TRUE, alphavec=c(0.5, 0.5), add.legend=TRUE, ...)
Plots for 1-d and 2-d are sent to graphics window. Plot for 3-d is sent to graphics/RGL window.
kde.local.test
## bivariate
data(air)
air.var <- c("co2","pm10","no")
air <- air[, c("date","time",air.var)]
air2 <- reshape(air, idvar="date", timevar="time", direction="wide")
a1 <- as.matrix(na.omit(air2[, paste0(air.var, ".08:00")]))
a2 <- as.matrix(na.omit(air2[, paste0(air.var, ".20:00")]))
colnames(a1) <- air.var
colnames(a2) <- air.var
loct <- kde.local.test(x1=a1[,c("co2","pm10")], x2=a2[,c("co2","pm10")])
plot(loct, lwd=1)
## trivariate
loct <- kde.local.test(x1=a1, x2=a2)
plot(loct, xlim=c(0,800), ylim=c(0,300), zlim=c(0,300))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.