knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(predictr) library(dplyr) library(ggplot2)
FPF <- .2 TPF <- .85 getLRatios(FPF, TPF)
ggplot()+ geom_point(aes(x = FPF, y = TPF)) + geom_line(data = getIsoOR(TPF, FPF), aes(x = FPF, y = TPF)) + geom_abline(data = getIsoLR(TPF, FPF), aes(intercept = intercept, slope = slope)) + geom_abline(intercept = 0, slope = 1, colour = "grey") + coord_cartesian(xlim = c(0,1), ylim = c(0,1), expand = F) + theme_bw()
getPredValues(FPF, TPF) %>% ggplot(aes(x = prior, y = posterior, group = type)) + geom_line() + theme_bw()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.