plineplot: Plotting marginal posterior class probabilities

Description Usage Arguments Value Author(s) See Also Examples

View source: R/plineplot.R

Description

For a given variable the posteriori probabilities of the classes given by a classification method are plotted. The variable need not be used for the actual classifcation.

Usage

1
2
plineplot(formula, data, method, x, col.wrong = "red", 
          ylim = c(0, 1), loo = FALSE, mfrow, ...)

Arguments

formula

formula of the form groups ~ x1 + x2 + .... That is, the response is the grouping factor and the right hand side specifies the (non-factor) discriminators.

data

Data frame from which variables specified in formula are preferentially to be taken.

method

character, name of classification function (e.g. “lda”).

x

variable that should be plotted. See examples.

col.wrong

color to use for missclassified objects.

ylim

ylim for the plot.

loo

logical, whether leave-one-out estimate is used for prediction

mfrow

number of rows and columns in the graphics device, see par. If missing, number of rows equals number of classes, and 1 column.

...

further arguments passed to the underlying classification method or plot functions.

Value

The actual error rate.

Author(s)

Karsten Luebke, [email protected]

See Also

partimat

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(MASS)

# The name of the variable can be used for x
data(B3)
plineplot(PHASEN ~ ., data = B3, method = "lda", 
    x = "EWAJW", xlab = "EWAJW")

# The plotted variable need not be in the data
data(iris)
iris2 <- iris[ , c(1,3,5)]
plineplot(Species ~ ., data = iris2, method = "lda", 
    x = iris[ , 4], xlab = "Petal.Width")

klaR documentation built on March 19, 2018, 5:03 p.m.