|
11 | 11 | #' The result of the subsetting must include at least two variables, whether they be the MAP classification, a response variable, or a covariate, in order to be valid for plotting purposes. The arguments \code{data.ind} and \code{cov.ind} can also be used to simply reorder the panels, without actually subsetting.
|
12 | 12 | #' @param response.type The type of plot desired for the scatterplots comparing continuous response variables. Defaults to \code{"points"}. See \code{scatter.pars} below.
|
13 | 13 | #'
|
14 |
| -#' Points can also be sized according to their associated clustering uncertainty with the option \code{"uncertainty"}. In doing so, the transparency of the points will also be proportional to their clustering uncertainty, provided the device supports transparency. See also \code{\link{MoE_Uncertainty}} for an alternative means of visualising observation-specific cluster uncertainties (especially for univariate data). See \code{scatter.pars} below. |
| 14 | +#' Points can also be sized according to their associated clustering uncertainty with the option \code{"uncertainty"}. In doing so, the transparency of the points will also be proportional to their clustering uncertainty, provided the device supports transparency. See also \code{\link{MoE_Uncertainty}} for an alternative means of visualising observation-specific cluster uncertainties (especially for univariate data). See \code{scatter.pars} below, and note that models fitted via the \code{"CEM"} algorithm will have no associated clustering uncertainty. |
15 | 15 | #'
|
16 | 16 | #' Alternatively, the bivariate \code{"density"} contours can be displayed (see \code{density.pars}), provided there is at least one Gaussian component in the model. Caution is advised when producing density plots for models with covariates in the expert network; the required number of evaluations of the (multivariate) Gaussian density for each panel (\code{res$G * prod(density.pars$grid.size)}) increases by a factor of \code{res$n}, thus plotting may be slow (particularly for large data sets). See \code{density.pars} below.
|
17 | 17 | #' @param scatter.type A vector of length 2 (or 1) giving the plot type for the upper and lower triangular portions of the plot, respectively, pertaining to the associated covariates. Defaults to \code{"lm"} for covariate vs. response panels and \code{"points"} otherwise. Only relevant for models with continuous covariates in the gating &/or expert network. \code{"ci"} and \code{"lm"} type plots are only produced for plots pairing covariates with response, and never response vs. response or covariate vs. covariate. Note that lines &/or confidence intervals will only be drawn for continuous covariates included in the expert network; to include covariates included only in the gating network also, the options \code{"lm2"} or \code{"ci2"} can be used but this is not generally advisable. See \code{scatter.pars} below.
|
@@ -389,6 +389,7 @@ MoE_gpairs.MoEClust <- function(res, response.type = c("points", "uncertainty",
|
389 | 389 | } else stop("'scatter.pars$eci.col' must be of length 1 or G", call.=FALSE)
|
390 | 390 | }
|
391 | 391 | if(response.type == "uncertainty") {
|
| 392 | + if(attr(res, "Algo") == "CEM") message("Model was fitted by CEM and has no clustering uncertainty\n") |
392 | 393 | uncertainty <- res$uncertainty
|
393 | 394 | uncertainty <- res$uncertainty <- (uncertainty - min(uncertainty))/(diff(range(uncertainty)) + .Machine$double.eps)
|
394 | 395 | bubbleX <- .bubble(uncertainty, cex=c(0.3, 2.8), alpha=c(0.3, 0.8))
|
@@ -914,6 +915,7 @@ MoE_Uncertainty.MoEClust <- function(res, type = c("barplot", "profile"), truth
|
914 | 915 | }
|
915 | 916 | G <- res$G + noise
|
916 | 917 | if(G == 1) message("No clustering has taken place!\n")
|
| 918 | + if(attr(res, "Algo") == "CEM") message("Model was fitted by CEM: no uncertainties to plot\n") |
917 | 919 | oneG <- 1/G
|
918 | 920 | min1G <- 1 - oneG
|
919 | 921 | yx <- unique(c(0, pretty(c(0, min1G))))
|
|
0 commit comments