Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Ondrej Slama committed Feb 23, 2024
1 parent 5ed57ec commit e830506
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ where you can see function reference as well as introduction vignette.

## Example

This is a basic example which demonstrates one of the plotting functions from the package,
`riskProfile`:
This is a basic example which demonstrates `riskProfile` function (i.e. Predictiveness Curve):

``` r
library(stats4phc)
Expand All @@ -54,17 +53,19 @@ truth <- as.numeric(auroc$actual)

# Default plot includes 1-NPV, PPV, and a predictiveness curve (PC)
p1 <- riskProfile(outcome = truth, score = rscore)
# p1 is a list with "plot" and "data" elements, see `p1$plot` or `p1$data`

# You can select an estimation method with specific arguments
p2 <- riskProfile(
outcome = truth,
score = rscore,
methods = list(
"gam" = list(method = "gam", bs = "tp", k = 5, logscores = FALSE, fitonPerc = TRUE),
"asis" = list(method = "asis"), # no arguments for this method
"bin" = list(method = "binned", quantiles = 10, errorbar.sem = 1)
)
)
# see `p2$plot` or `p2$data`
p1$plot
# You can also access the underlying data with `p1$data`
```

![](man/figures/readme_p1.png)

<br/>

and `sensSpec` function (Sensitivity and Specificity Plot):

```r
p2 <- sensSpec(outcome = truth, score = rscore)
p2$plot
```

![](man/figures/readme_p2.png)
Binary file added man/figures/readme_p1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/readme_p2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e830506

Please sign in to comment.