cond.plot: Conditional Plots

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/cond.plot.R

Description

This function provides several styles of conditional plots with base graphics.

Usage

1
cond.plot(x, y, z, Style="smoothscatter")

Arguments

x

This required argument accepts a numeric vector.

y

This argument accepts a numeric vector, and is only used with some styles.

z

This required argument accepts a discrete vector.

Style

This argument specifies the style of plot, and accepts "boxplot", "densover" (density overlay), "hist", "scatter", or "smoothscatter".

Details

The cond.plot function provides simple conditional plots with base graphics. All plot styles are conditional upon z. Up to nine conditional plots are produced in a panel.

Plots include:

boxplot: y ~ x | z densover: f(x | z) hist: x | z scatter: x, y | z smoothscatter: x, y | z

The cond.plot function is not intended to try to compete with some of the better graphics packages, but merely to provide simple functionality.

Value

Conditional plots are returned.

Author(s)

Statisticat, LLC. software@bayesian-inference.com

See Also

joint.density.plot and joint.pr.plot.

Examples

1
2
3
4
5
library(LaplacesDemon)
x <- rnorm(1000)
y <- runif(1000)
z <- rcat(1000, rep(1/4,4))
cond.plot(x, y, z, Style="smoothscatter")

LaplacesDemon documentation built on July 9, 2021, 5:07 p.m.