pcc {multid}R Documentation

Returns probabilities of correct classification for both groups in independent data partition.

Description

Returns probabilities of correct classification for both groups in independent data partition.

Usage

pcc(data, pred.var, group.var, group.values)

Arguments

data

Data frame including predicted values (e.g., pred.dat from D_regularized_out).

pred.var

Character string. Variable name for predicted values.

group.var

The name of the group variable.

group.values

Vector of length 2, group values (e.g. c("male", "female) or c(0,1)).

Value

Vector of length 2. Probabilities of correct classification.

Examples

D_out <- D_regularized(
  data = iris[iris$Species == "versicolor" | iris$Species == "virginica", ],
  mv.vars = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width"),
  group.var = "Species", group.values = c("versicolor", "virginica"),
  out = TRUE,
  size = 15
)

pcc(
  data = D_out$pred.dat,
  pred.var = "pred",
  group.var = "group",
  group.values = c("versicolor", "virginica")
)

[Package multid version 1.0.0 Index]