# predict.loclda: Localized Linear Discriminant Analysis (LocLDA)

## Description

Classifies new observations using parameters determined by
the `loclda`

-function.

## Usage

# S3 method for loclda
predict(object, newdata, ...)

## Arguments

newdata

Data frame of cases to be classified.

…

Further arguments are ignored.

## Value

A list with components:

classVector (of class `factor`

) of classifications.

posteriorPosterior probabilities for the classes.
For details of computation see `loclda`

(+ normalization so posterior-values add up to 1 for each observation).

all.zeroVector (of class `integer`

) indicating for which rows of
`newdata`

all corresponding posterior-values are \(< 10^{-150}\) before normalization.
Those observations are assigned to the class to whose (locally weighted) centroid they have the
lowest euclidian distance.

## Examples

# NOT RUN {
data(B3)
x <- loclda(PHASEN ~ ., data = B3, subset = 1:80)
predict(x, B3[-(1:80),])
# }