plotDist: Plot a distribution of a data distribution object

Description Usage Arguments Value Author(s) See Also Examples

View source: R/plotDist.R

Description

Plot a distribution of a data distribution object

Usage

1
plotDist(object, xlim = NULL, ylim = NULL, r = 0, var = NULL, contour = TRUE)

Arguments

object

The data distribution object (SimDataDist) to plot a distribution

xlim

A numeric vector with two elements specifying the lower and upper limit of the x-axis to be plotted.

ylim

A numeric vector with two elements specifying the lower and upper limit of the y-axis to be plotted. This argument is applicable for the joint distribution of two dimensions only

r

The correlation of two dimensions in the joint distribution

var

A vector of the index of variables to be plotted. The length of vector cannot be greater than 2.

contour

Applicable if two variables are used only. If TRUE, the contour plot is provided. If FALSE, the perspective plot is provided.

Value

No return value. This function will plot a graph only.

Author(s)

Sunthud Pornprasertmanit ([email protected])

See Also

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
datadist <- bindDist(skewness = c(0, -2, 2), kurtosis = c(2, 4, 4))

# Plot the joint distribution of Variables 1 and 2 with correlation of 0.5
plotDist(datadist, r=0.5, var=1:2)

# Plot the marginal distribution of the variable 3
plotDist(datadist, var=3)

## Not run: 
datadist2 <- bindDist(c("chisq", "t", "f"), list(df=5), list(df=3), list(df1=3, df2=5))

# Plot the joint distribution of Variables 1 and 2 with correlation of 0.5
plotDist(datadist2, r=0.5, var=1:2)

# Plot the marginal distribution of the variable 3
plotDist(datadist2, var=3)

## End(Not run)

simsem documentation built on May 29, 2017, 10:40 a.m.

Related to plotDist in simsem...