Learn R Programming

mvst (version 1.1.1)

bivPlot: Marginal and joint plots for bivariate data.

Description

Scatterplot and marginal histograms for bivariate data. If theta is provided, the joint and marginal densities will be superimposed.

Usage

bivPlot(y, modelType=NULL, theta=NULL)

Value

The function draws a plot for bivariate data.

Arguments

y

Data matrix or vector.

modelType

(optional) model specification. Already implemented modelTypes are 'N' (Normal), 'SN' (skew-normal), 'T' (Student T), and 'ST' (skew-t).

theta

(optional) list of parameters. The list should contain elements named 'xi' (a numeric vector) or 'B' (a kxp matrix), 'G' (a pxp matrix), 'psi' (a numeric vetor, optional) and 'nu' (a scalar, optional). See Details.

Examples

Run this code
# Define the parameters' list
pars = list(xi=c(5,2), G=diag(2), psi=rep(1,2), nu=4)
# Generate data
values = rmvSE(200, 2, NULL, 'ST', theta=pars)
y = values$y
# Draw the data points.
bivPlot(y)
# Draw the data points and the density function.
bivPlot(y, modelType='ST', theta=pars)

Run the code above in your browser using DataLab