count2threshold: Poset threshold from the OPHI counting approach

Description Usage Arguments See Also Examples

View source: R/count2threshold.R

Description

The function defines the threshold for the poset with profiles prof and incidence matrix zeta from the OPHI counting approach described in the argument mpi.

Usage

1
count2threshold(mpi, prof, zeta = NULL)

Arguments

mpi

an object of class ophi, see count for details.

prof

an object of class wprof.

zeta

an object of class incidence. The function can obtain the the complete incidence matrix form the argument prof.

See Also

count

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
vl <- c(2, 3, 3, 2)
prof <- var2prof(varlen = vl, labtype = "progressive")

res <- count(prof, z = c(1, 2, 1, 1), k = 1)

thr <- count2threshold(res, prof)

plot(prof, col = 1 + thr, lwd = 1 + res$c,
     main = "Comparison between OPHI and parsec",
     sub = "bold: deprived profiles identified by OPHI, red: parsec threshold")

eval <- evaluation(prof, thr, maxint = 10^4, nit = 10^7)

ord <- order(eval$identification_function, res$c)
plot(eval$identification_function[ord], col = "red", lwd=2, type = "l", xlab="",
     ylab = "", axes = FALSE, frame.plot = TRUE,
     main = "Comparison between OPHI and parsec",
     sub = "red: identification function, black: OPHI deprived profiles")
points(res$c[ord], type="l", lwd=2)
axis(2)

parsec documentation built on May 2, 2019, 6:08 p.m.