Learn R Programming

folda (version 0.1.0)

getLDscores: Compute Linear Discriminant Scores

Description

Compute Linear Discriminant Scores

Usage

getLDscores(modelLDA, data, nScores = -1)

Value

A matrix of linear discriminant scores, where rows correspond to observations and columns correspond to the computed discriminant scores. If nScores > 0, only the specified number of scores is returned; otherwise, all scores are computed and returned.

Arguments

modelLDA

A fitted LDA model object containing the scaling matrix and the reference structure for missing data.

data

A data frame containing the predictor variables for which to compute the linear discriminant scores.

nScores

An integer specifying the number of discriminant scores to compute. If -1 (default), all scores are computed.