plot.cusp | R Documentation |
This function generates diagnostic graphical displays of fits of a cusp catastrophe model to data obtained with cusp
## S3 method for class 'cusp'
plot(x, what = c("all", "bifurcation", "residual", "densities"), ...)
x |
Object returned by |
what |
1-character string giving the type of plot desired. The following values are possible: |
... |
named arguments that are passed to lower level plotting function |
These diagnostic plots help to identify problems with the fitted model. In optimal cases the fitted locations in the parameter plane are dispersed over regions of qualitatively different behavior. Within each region the fitted dependent values have a density of the appropriate shape (e.g., bimodal in the bifurcation set).
No return value. Called for its side effect.
Raoul Grasman
See cusp-package
plotCuspBifurcation
, plotCuspResidfitted
, plotCuspDensities
set.seed(20)
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)
# just densities
layout(matrix(1:4,2))
plot(fit, what="densities")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.