Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

splom2-methods

Methods for Scatter Plot Matrix 'splom2' in Package 'copula'


Description

Methods splom2() to draw scatter-plot matrices of (random samples of) distributions from package copula.

Usage

## S4 method for signature 'matrix'
splom2(x, varnames = NULL, varnames.null.lab = "U",
      xlab = "", col.mat = NULL, bg.col.mat = NULL, ...)
## ditto an identical  'data.frame'  method

## S4 method for signature 'Copula'
splom2(x, n, ...)
## S4 method for signature 'mvdc'
splom2(x, n, varnames.null.lab = "X", ...)

Arguments

x

a "matrix", "data.frame", "Copula" or a "mvdc" object.

n

when x is not matrix-like: The sample size of the random sample drawn from x.

varnames

the variable names, typically unspecified.

varnames.null.lab

the character string determining the “base name” of the variable labels in case varnames is NULL and x does not have all column names given.

xlab

the x-axis label.

col.mat

a matrix of colors (or one color) for the plot symbols; if NULL (as by default), trellis.par.get("plot.symbol")$col is used for all symbols. (Note that in copula version 0.999-15, this was not true; instead "black" was used.)

bg.col.mat

a matrix of colors for the background (the default is the setting as obtained from trellis.par.get("background")$col).

...

additional arguments passed to the underlying splom().

Value

From splom(), an R object of class "trellis".

See Also

pairs2() for a similar function (for matrices and data frames) based on pairs().

The lattice-based cloud2-methods for 3D data, and wireframe2-methods and contourplot2-methods for functions.

Examples

## For 'matrix' objects
## Create a 100 x 7 matrix of random variates from a t distribution
## with four degrees of freedom and plot the generated data
n <- 1000 # sample size
d <- 3 # dimension
nu <- 4 # degrees of freedom
tau <- 0.5 # Kendall's tau
th <- iTau(tCopula(df = nu), tau) # corresponding parameter
cop <- tCopula(th, dim = d, df = nu) # define copula object
set.seed(271)
U <- rCopula(n, copula = cop)
splom2(U)

## For 'copula' objects
set.seed(271)
splom2(cop, n = n) # same as above

## For 'rotCopula' objects: ---> Examples in rotCopula

## For 'mvdc' objects
mvNN <- mvdc(cop, c("norm", "norm", "exp"),
             list(list(mean = 0, sd = 1), list(mean = 1), list(rate = 2)))
splom2(mvNN, n = n)

copula

Multivariate Dependence with Copulas

v1.0-1
GPL (>= 3) | file LICENCE
Authors
Marius Hofert [aut] (<https://orcid.org/0000-0001-8009-4665>), Ivan Kojadinovic [aut] (<https://orcid.org/0000-0002-2903-1543>), Martin Maechler [aut, cre] (<https://orcid.org/0000-0002-8685-9910>), Jun Yan [aut] (<https://orcid.org/0000-0003-4401-7296>), Johanna G. Nešlehová [ctb] (evTestK(), <https://orcid.org/0000-0001-9634-4796>), Rebecca Morger [ctb] (fitCopula.ml(): code for free mixCopula weight parameters)
Initial release
2020-12-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.