Probability or classification plots for a polyclass
model.
# S3 method for polyclass
plot(x, cov, which, lims, what, data, n, xlab="", ylab="",
zlab="", ...)
polyclass
object, typically the result of polyclass
.
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.
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.
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.
an integer between 1 and 8, defining the type of plot to be made.
Plots the probability of one class as a contour plot of two variables.
Plots the probability of one class as a perspective plot of two variables.
Plots the probability of one class as an image plot of two variables.
Classifies the area as a contour plot of two variables.
Classifies the area as an image plot of two variables.
Classifies the line as a plot of one variable.
Plots the probabilities of all classes as a function of one variable.
Plots the probability of one class as a function of one variable.
Class for which the plot is made. Should be provided if what
is 1, 2, 3 or 8.
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.
axis plotting labels.
all other options are passed on.
Charles Kooperberg clk@fredhutch.org.
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.
polyclass
,
summary.polyclass
,
beta.polyclass
,
cpolyclass
,
ppolyclass
,
rpolyclass
.
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