Learn R Programming

trajeR (version 1.0)

OCC: Odds of Correct Classification (OCC)

Description

The Odds of Correct Classification (OCC) compares the odds of correct assignment using the model's posterior probabilities against the odds of assignment based on the estimated group proportions alone. A high OCC value suggests that the model provides a much better classification than a random assignment.

Usage

OCC(sol, Y, A)

Value

A named numeric vector of the same length as the number of groups, containing the OCC for each group.

Arguments

sol

A trajectory object returned by the trajeR function.

Y

The response variable matrix, as used in the `trajeR` call.

A

The time variable matrix, as used in the `trajeR` call.

Examples

Run this code
data <- read.csv(system.file("extdata", "CNORM2gr.csv", package = "trajeR"))
data <- as.matrix(data)
sol <- trajeR(Y = data[, 2:6], A = data[, 7:11], Risk = data[, 12, drop = FALSE],
              degre = c(2, 2), Model = "CNORM", Method = "EM")
OCC(sol, Y = data[, 2:6], A = data[, 7:11])

Run the code above in your browser using DataLab