plot.cECM {ezECM} | R Documentation |
Plot the data and output of cECM()
categorization
Description
Plot the data and output of cECM()
categorization
Usage
## S3 method for class 'cECM'
plot(x, discriminants = c(1, 2), thenull = NULL, alphatilde = 0.05, ...)
Arguments
x |
an object of which is of class |
discriminants |
character or integer vector of length two. If a character vector is provided, the character strings must match a subset of the column names for the training data, ie. |
thenull |
character string or |
alphatilde |
numeric value specifying hypothesis testing significance level. Used in conjunction with |
... |
arguments passed to |
Details
The plot generated from plot.ecm() is first dependent on if the provided x$newdata
contains a data frame of unlabled data.
If unlabled data is not part of the "cECM"
object, the labled data is simply plotted with the 0.68 and 0.95 confidence levels obtained from the distribution fits returned from cECM()
.
If unlabled data is part of the "cECM"
object, the unlabled data is plotted in addition to the distribution plots. Each unlabled data point appears on the plot as an integer, which indexes the corresponding row of x$newdata
.
Value
Plot illustrating results of cECM()
Examples
x <- pval_gen(sims = 20, pwave.arrival = list(optim.starts = 5))
s <- sample(1:20, size = 2)
newdata <- x[s,]
newdata <- newdata[,-which(names(newdata) == "event")]
x <- x[-s,]
pval_cat <- cECM(x = x, transform = TRUE)
pval_cat <- cECM(x = pval_cat, newdata = newdata)
plot(x = pval_cat, thenull = "explosion")