plotCuspBifurcation | R Documentation |
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).
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)
object |
object returned by |
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 |
col |
color used in plots |
cex.xlab , cex.ylab |
see |
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 |
cex.scale , cex , pch |
see |
The default hue of each dot is a function of the height of the cusp surface to which it is closest. This is especially useful 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.
No return value. Called for its side effect.
Raoul Grasman
See cusp-package
plot.cusp
, cusp3d
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.