Polyclass: polychotomous regression and multiple classification
Classify new cases (cpolyclass
), compute class probabilities
for new cases (ppolyclass
), and generate random multinomials for new cases
(rpolyclass
) for a polyclass
model.
cpolyclass(cov, fit) ppolyclass(data, cov, fit) rpolyclass(n, cov, fit)
cov |
covariates. Should be a matrix with |
fit |
|
data |
there are several possibilities. If data is a vector with as many elements as cov has rows, each element of data corresponds to a row of cov; if only one value is given, the probability of being in that class is computed for all sets of covariates. If data is omitted, all class probabilities are provided. |
n |
number of pseudo random numbers to be generated. |
Most likely classes (cpolyclass
),
probabilities (cpolyclass
), or
random classes according to the estimated probabilities (rpolyclass
).
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.
data(iris) fit.iris <- polyclass(iris[,5], iris[,1:4]) class.iris <- cpolyclass(iris[,1:4], fit.iris) table(class.iris, iris[,5]) prob.setosa <- ppolyclass(1, iris[,1:4], fit.iris) prob.correct <- ppolyclass(iris[,5], iris[,1:4], fit.iris) rpolyclass(100, iris[64,1:4], fit.iris)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.