plot.MBGR: Plot Mixture of Bivariate Gamma Regressions and Clustering...

Description Usage Arguments Value Examples

View source: R/plot.R

Description

Plot mixture of bivariate gamma regressions, or model-based clustering with bivariage gamma distributions and covariates: classification, uncertainty

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'MBGR'
plot(x, what = "classification", col = NULL,
  pch = NULL, xlab = NULL, ylab = NULL, main = FALSE, ...)

## S3 method for class 'BGR'
plot(x, col = NULL, pch = NULL, xlab = NULL,
  ylab = NULL, main = FALSE, ...)

## S3 method for class 'MBGC'
plot(x, what = "classification", col = NULL,
  pch = NULL, xlab = NULL, ylab = NULL, main = FALSE, ...)

Arguments

x

Output from MBGR functions.

what

The type of graph requested, either "classification", or "uncertainty", or "fitted".

col

The colors of points in clusters.

pch

The plotting characters or symbols in clusters.

xlab, ylab

Optional labels for the x-axis and the y-axis.

main

A logical or NULL indicating whether or not to add a title to the plot identifying the type of plot.

...

Other graphical parameters.

Value

For BGR model, fitted values are plotted.

For MBGR model:

what=="classification"

a plot showing the clustering labels.

what=="uncertainty"

a plot of classification uncertainty.

what=="fitted"

a plot of fitted values.

For MBGC model:

what=="classification"

a plot showing the clustering labels.

what=="uncertainty"

a plot of classification uncertainty.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
m1 <- MBGR(modelName = "CE", y=c("y1","y2"),
           data   = fullsim, G=2,
           f1     = ~ w1 + w2,
           f2     = ~ w2 + w3,
           f3     = ~ w1 + w2 + w3,
           f4     = ~ w1 + w2 + w3,
           gating = "C", verbose = FALSE)
plot.MBGR(m1, what="classification")
plot.MBGR(m1, what="uncertainty")
plot.MBGR(m1, what="fitted")
m2 <- BGR(modelName = "EI",
          y = c("y1","y2"), data = fullsim,
          f1     = ~ w1 + w2,
          f2     = ~ w2 + w3,
          f3     = ~ w1 + w2 + w3, verbose = FALSE)
plot.BGR(m2)

senhu/mvClaim documentation built on Jan. 29, 2022, 3:18 p.m.