plotCuspBifurcation: Display Fitted Data on Control Plane of Cusp Catastrophe.

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

Description

Displays fitted data points on the control plane of cusp catastrophe. The function takes a fit object obtained with cusp and generates a plot. Different diagnostic plots may be chosen, or all can be combined in a single plot (the default).

Usage

1
2
3
4
5
6
7
8
plotCuspBifurcation(object, xlim = a + c(-0.3, 0.3), ylim = b + c(-0.1,
                 0.1), xlab = expression(alpha), ylab =
                 expression(beta), hue = 0.5 + 0.25 * tanh(object$y),
                 col = hsv(h = hue, s = 1, alpha = 0.4), cex.xlab =
                 1.55, cex.ylab = cex.xlab, axes = TRUE, box = TRUE,
                 add = FALSE, bifurcation.set.fill = gray(0.8),
                 cex.scale = 15, cex = (cex.scale/log(NROW(ab))) *
                 dens/max(dens), pch = 20)

Arguments

object

object returned by cusp

xlim

the x limits (x1, x2) of the plot.

ylim

the y limits of the plot.

xlab

a label for the x axis.

ylab

a label for the x axis.

hue

hue of points (see hsv)

col

color used in plots

cex.xlab, cex.ylab

see par

axes

logical. Should the axes be displayed?

box

logical. Should a box be drawn around the plot?

add

logical. Add to current plot?

bifurcation.set.fill

1-character string. Color used to fill the bifurcation set (see colors).

cex.scale, cex, pch

see par

Details

The default hue of each dot is a function of the height of the cusp surface to which it is closest. This is especially usefull in the bifurcation set. Purple dots are higher than green dots.

The size of the dots depends on the density of dots at its location. The higher the density the larger the dot.

Author(s)

Raoul Grasman

References

See cusp-package

See Also

plot.cusp, cusp3d

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(20)
# example with regressors
x1 = runif(150)
x2 = runif(150)
z = Vectorize(rcusp)(1, 4*x1-2, 4*x2-1)
data <- data.frame(x1, x2, z)
fit <- cusp(y ~ z, alpha ~ x1+x2, beta ~ x1+x2, data)
## Not run: 
plot(fit, what='bifurcation', box=TRUE, axes=FALSE)

## End(Not run)

Example output



cusp documentation built on May 2, 2019, 6:51 p.m.