View source: R/PLOT_plotUnivariateDistributions.R
plotDataCI | R Documentation |
Mean and 95%-level confidence intervals per class
plotDataCI(
output,
var,
class = seq_len(output$algo$nClass),
grl = FALSE,
pkg = c("ggplot2", "plotly"),
...
)
output |
object returned by mixtCompLearn function from RMixtComp or rmcMultiRun function from RMixtCompIO |
var |
name of the variable |
class |
class to plot |
grl |
if TRUE plot the CI for the dataset and not only classes |
pkg |
"ggplot2" or "plotly". Package used to plot |
... |
other parameters (see Details) |
For functional data, three other parameters are available:
if TRUE, observations are added to the plot. Default = FALSE.
if FALSE, confidence intervals are removed from the plot. Default = TRUE.
xlim of the plot.
ylim of the plot.
Matthieu MARBAC
Other plot:
heatmapClass()
,
heatmapTikSorted()
,
heatmapVar()
,
histMisclassif()
,
plot.MixtComp()
,
plotConvergence()
,
plotDataBoxplot()
,
plotDiscrimClass()
,
plotDiscrimVar()
,
plotParamConvergence()
,
plotProportion()
if (requireNamespace("RMixtCompIO", quietly = TRUE)) {
dataLearn <- list(
var1 = as.character(c(rnorm(50, -2, 0.8), rnorm(50, 2, 0.8))),
var2 = as.character(c(rnorm(50, 2), rpois(50, 8)))
)
model <- list(
var1 = list(type = "Gaussian", paramStr = ""),
var2 = list(type = "Poisson", paramStr = "")
)
algo <- list(
nClass = 2,
nInd = 100,
nbBurnInIter = 100,
nbIter = 100,
nbGibbsBurnInIter = 100,
nbGibbsIter = 100,
nInitPerClass = 3,
nSemTry = 20,
confidenceLevel = 0.95,
ratioStableCriterion = 0.95,
nStableCriterion = 10,
mode = "learn"
)
resLearn <-RMixtCompIO::rmcMultiRun(algo, dataLearn, model, nRun = 3)
# plot
plotDataCI(resLearn, "var1")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.