Skip to content

Commit e868e23

Browse files
author
Ondrej Slama
authored
update wording and image (#5)
2 parents 6812619 + 511ad8b commit e868e23

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ where you can see function reference as well as introduction vignette.
4141

4242
## Example
4343

44-
This is a basic example which demonstrates `riskProfile` function (i.e. Predictiveness Curve):
44+
This is a basic example which demonstrates `riskProfile` function (i.e. Predictiveness curve):
4545

4646
``` r
4747
library(stats4phc)
@@ -51,8 +51,8 @@ auroc <- read.csv(system.file("extdata", "sample.csv", package = "stats4phc"))
5151
rscore <- auroc$predicted_calibrated
5252
truth <- as.numeric(auroc$actual)
5353

54-
# Default plot includes 1-NPV, PPV, and a predictiveness curve (PC)
55-
p1 <- riskProfile(outcome = truth, score = rscore)
54+
# For clarity, show just PPV and 1-NPV. Or display Predictiveness curve by using "PC"
55+
p1 <- riskProfile(outcome = truth, score = rscore, include = c("PPV", "1-NPV"))
5656
p1$plot
5757
# You can also access the underlying data with `p1$data`
5858
```

man/figures/readme_p1.png

64.3 KB
Loading

vignettes/stats4phc.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ p <- riskProfile(outcome = truth, score = rscore, include = "PC")
7373
p$plot
7474
```
7575

76-
Ideally, all subjects in the population that have the condition (=> prevalence) are marked as having the condition (predicted risk = 1) and all subjects without the condition (=> 1 - prevalence) are marked as not having the condition (predicted risk = 0).
76+
In an ideal scenario, all subjects in the population that have the condition (=> prevalence) are marked as having the condition (predicted risk = 1) and all subjects without the condition (=> 1 - prevalence) are marked as not having the condition (predicted risk = 0).
7777
This implies that the ideal predictiveness curve is 0 for all subjects not having the condition,
7878
and then it steps (jumps) at `1 - prevalence` to 1 for all the subjects having the condition (see the gray line).
7979

@@ -96,10 +96,10 @@ Again, in an ideal case, they both are as close to the gray lines as possible.
9696
In an ideal scenario:
9797

9898
- in terms of PPV: If all the subjects with the condition are predicted perfectly, then PPV = TP / PP = 1 (TP = true positive, PP = predicted positive).
99-
Hence, all the subjects with the condition must be higher than `1 - prevalence` on the prediction percentile for PPV = 1.
99+
Hence, PPV = 1 at the score percentile greater or equal to `1 - prevalence` (these scores refer to the subjects with the condition).
100100

101101
- in terms of 1-NPV: If all the subjects without the condition are predicted perfectly, then NPV = TN / PN = 1 (TN = true negative, PN = predicted negative).
102-
Hence, all the subjects without the condition must be lower than `1 - prevalence` on the risk percentile for 1-NPV = 0.
102+
Hence, 1-NPV = 0 at the score percentile lower or equal to `1 - prevalence` (these scores refer to the subjects without the condition).
103103

104104

105105
## Output settings

0 commit comments

Comments
 (0)