Learn R Programming

polspline (version 1.1.13)

plot.polyclass: Polyclass: polychotomous regression and multiple classification

Description

Probability or classification plots for a polyclass model.

Usage

# S3 method for polyclass
plot(x, cov, which, lims, what, data, n, xlab="", ylab="",
zlab="", ...)

Arguments

x

polyclass object, typically the result of polyclass.

cov

a vector of length fit\$ncov, indicating for which combination of covariates the plot should be made. Can never be omitted. Should always have length fit\$ncov, even if some values are irrelevant.

which

for which covariates should the plot be made. Number or a character string defining the name, if the same names were used with the call to polyclass. Which should have length one if what is 6 or larger and length two if what is 5 or smaller.

lims

plotting limits. If omitted, the plot is made over the same range of the covariate as in the original data. Otherwise a vector of length two of the form c(min, max) if what is 6 or larger and a vector of length four of the form c(xmin, xmax, ymin ,ymax) if what is 5 or smaller.

what

an integer between 1 and 8, defining the type of plot to be made.

  1. Plots the probability of one class as a contour plot of two variables.

  2. Plots the probability of one class as a perspective plot of two variables.

  3. Plots the probability of one class as an image plot of two variables.

  4. Classifies the area as a contour plot of two variables.

  5. Classifies the area as an image plot of two variables.

  6. Classifies the line as a plot of one variable.

  7. Plots the probabilities of all classes as a function of one variable.

  8. Plots the probability of one class as a function of one variable.

data

Class for which the plot is made. Should be provided if what is 1, 2, 3 or 8.

n

the number of equally spaced points at which to plot the fit. The default is 250 if what is 6 or larger or 50 (which results in 2500 plotting points) if what is 5 or smaller.

xlab,ylab,zlab

axis plotting labels.

...

all other options are passed on.

References

Charles Kooperberg, Smarajit Bose, and Charles J. Stone (1997). Polychotomous regression. Journal of the American Statistical Association, 92, 117--127.

Charles J. Stone, Mark Hansen, Charles Kooperberg, and Young K. Truong. The use of polynomial splines and their tensor products in extended linear modeling (with discussion) (1997). Annals of Statistics, 25, 1371--1470.

See Also

polyclass, summary.polyclass, beta.polyclass, cpolyclass, ppolyclass, rpolyclass.

Examples

Run this code
# NOT RUN {
data(iris)
fit.iris <- polyclass(iris[,5], iris[,1:4])
plot(fit.iris, iris[64,1:4], which=c(3,4), data=2, what=1) 
plot(fit.iris,iris[64,1:4], which=c(3,4), what=5) 
plot(fit.iris,iris[64,1:4], which=4, what=7) 
# }

Run the code above in your browser using DataLab