Skip to content

Ordered treated as numbers #63

@xrobin

Description

@xrobin
> text.levels <- aSAH$wfns
> head(text.levels)
[1] 1 1 1 1 3 2
Levels: 1 < 2 < 3 < 4 < 5
> levels(text.levels)
[1] "1" "2" "3" "4" "5"
> levels(text.levels) <- c("very low", "low", "medium", "high", "very high")
> head(text.levels)
[1] very low very low very low very low medium   low     
Levels: very low < low < medium < high < very high
> r <- roc(aSAH$outcome, text.levels)
> r$thresholds
[1] -Inf  1.5  2.5  3.5  4.5  Inf

Only makes sense if ordered values are actually 1, 2, ... n

Steps to reproduce:

text.levels <- aSAH$wfns
levels(text.levels) <- c("very low", "low", "medium", "high", "very high")
r <- roc(aSAH$outcome, text.levels)
r$thresholds

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-changeThe issue describes a change in the API visible to the userbugNo, it's not a feature!

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions