View source: R/USER_rMMSN.contour.R

rMMSN.contour | R Documentation |

It plots the scatter plots with density contours for different multivariate distributions. Possible options are the Skew-normal (`family == "SN"`

), Normal (`family == "Normal"`

) and Student-t (`family == "t"`

) distribution. Different colors are used by groups. Histograms are shown in the diagonal.

```
rMMSN.contour(model = NULL, y = NULL, mu = NULL, Sigma = NULL,
shape = NULL, nu = NULL, pii = NULL, Zij = NULL,
contour = FALSE, hist.Bin = 30, contour.Bin = 10,
slice = 100, col.names = NULL, length.x = c(0.5, 0.5),
length.y = c(0.5, 0.5), family = "SN")
```

`model` |
is an object resultant from the |

`y` |
the response matrix with dimension |

`mu` |
a list with |

`Sigma` |
a list with |

`shape` |
a list with |

`nu` |
the degrees of freedom for the Student-t distribution case, being a vector with dimension |

`pii` |
a vector of weights for the mixture of dimension |

`Zij` |
a matrix of dimension |

`contour` |
If |

`hist.Bin` |
number of bins in the histograms. Default is 30. |

`contour.Bin` |
creates evenly spaced contours in the range of the data. Default is 10. |

`slice` |
desired length of the sequence for the variables grid. This grid is build for the contours. |

`col.names` |
names passed to the data matrix |

`length.x` |
a vector of dimension 2 with the value to be subtracted and added from the minimum and maximum observation in the x-axis respectively. Default is |

`length.y` |
a vector of dimension 2 with the value to be subtracted and added from the minimum and maximum observation in the y-axis respectively. Default is |

`family` |
distribution family to be used. Available distributions are the Skew-normal ("SN"), normal ("Normal") or Student-t ("t") distribution. |

If the `model`

object is used, the user still has the option to choose the `family`

. If the `model`

object is not used, the user must input all other parameters. User may use the `rMMSN`

function to generate data.

This functions works well for any length of `g`

and `p`

, but contour densities are only shown for `p = 2`

.

Francisco H. C. de Alencar hildemardealencar@gmail.com, Christian E. Galarza cgalarza88@gmail.com, Victor Hugo Lachos hlachos@uconn.edu and Larissa A. Matos larissam@ime.unicamp.br

Maintainer: Francisco H. C. de Alencar hildemardealencar@gmail.com

Cabral, C. R. B., Lachos, V. H., & Prates, M. O. (2012). Multivariate mixture modeling using skew-normal independent distributions. Computational Statistics & Data Analysis, 56(1), 126-142.

Prates, M. O., Lachos, V. H., & Cabral, C. (2013). mixsmsn: Fitting finite mixture of scale mixture of skew-normal distributions. Journal of Statistical Software, 54(12), 1-20.

C.E. Galarza, L.A. Matos, D.K. Dey & V.H. Lachos. (2019) On Moments of Folded and Truncated Multivariate Extended Skew-Normal Distributions. Technical report. ID 19-14. University of Connecticut.

F.H.C. de Alencar, C.E. Galarza, L.A. Matos & V.H. Lachos. (2019) Finite Mixture Modeling of Censored and Missing Data Using the Multivariate Skew-Normal Distribution. echnical report. ID 19-31. University of Connecticut.

`fit.FMMSNC`

, `rMMSN`

and `fit.FMMSNC`

```
mu <- Sigma <- shape <- list()
mu[[1]] <- c(-3,-4)
mu[[2]] <- c(2,2)
Sigma[[1]] <- matrix(c(3,1,1,4.5), 2,2)
Sigma[[2]] <- matrix(c(2,1,1,3.5), 2,2)
shape[[1]] <- c(-2,2)
shape[[2]] <- c(-3,4)
nu <- 0
pii <- c(0.6,0.4)
percent <- c(0.1,0.2)
n <- 100
seed <- 654678
set.seed(seed)
test = rMMSN(n = n, pii = pii,mu = mu,Sigma = Sigma,shape = shape,
percent = percent, each = TRUE, family = "SN")
## SN ##
SN.contour = rMMSN.contour(model = NULL, y = test$y, Zij = test$G
,mu = mu, Sigma = Sigma, shape = shape, pii = pii, family = "SN")
#Plotting contours may take some time...
## SN ##
SN.contour = rMMSN.contour(model = NULL, y = test$y, Zij = test$G
,mu = mu, Sigma = Sigma, shape = shape, pii = pii, contour = TRUE,
family = "SN")
## Normal ##
N.contour = rMMSN.contour(model = NULL,y = test$y, Zij = test$G
,mu = mu, Sigma = Sigma, shape = shape, pii = pii, contour = TRUE,
family = "Normal")
## t ##
t.contour = rMMSN.contour(model = NULL,y = test$y, Zij = test$G
,mu = mu, Sigma = Sigma, shape = shape, pii = pii, nu = c(4,3),
contour = TRUE, family = "t")
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.