Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebaron committed Sep 4, 2019
1 parent c436613 commit a38867e
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 33 deletions.
23 changes: 16 additions & 7 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "local sensitivity analysis with mrgsolve"
title: ""
output: github_document
---

Expand All @@ -8,7 +8,16 @@ knitr::opts_chunk$set(comment = '.', message=FALSE, warning = FALSE,
fig.path="man/figures/README-")
```

# Model
# vera
<!-- badges: start -->
[![Travis build status](https://travis-ci.org/kylebaron/vera.svg?branch=master)](https://travis-ci.org/kylebaron/vera)
<!-- badges: end -->

## Overview
local sensitivity analysis in R with mrgsolve


## Model
Load the vera package and a PBPK model from the mrgsolve package. We
decrease the tolerance a bit as well as the maximum step size.
```{r,message=FALSE}
Expand All @@ -21,7 +30,7 @@ mod <- modlib(
) %>% obsonly
```

# Scenario
## Scenario
Create a function that uses the model to simulate a certain scenario. For now,
we just simulate a single dose.
```{r}
Expand All @@ -37,7 +46,7 @@ d <- ev(amt = 100)
fun(param(mod),d) %>% plot(Cp+Amu~time)
```

# Sensitivity analysis
## Sensitivity analysis

Use `vera::lsa()`. We pick the __parameters__ that we want to fiddle with
(`par`):
Expand All @@ -58,7 +67,7 @@ Also specify the __output__ that we want to look at (`var`):
out <- lsa(mod, fun, par = "Kpli,Kpmu,Kpad,BW", var = "Cp,Amu", dose = d)
```

# Ouput
## Ouput

The output is long and ready to send in to `ggplot2`.
```{r}
Expand All @@ -71,7 +80,7 @@ There is a default plotting method as well.
plot(out)
```

# Plot with ggplot2
## Plot with ggplot2
```{r}
library(ggplot2)
Expand All @@ -86,6 +95,6 @@ filter(out, par=="Kpmu") %>%

<hr>

# More info
## More info

See [inst/doc/about.md (on GitHub only)](inst/doc/about.md) for more details.
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
local sensitivity analysis with mrgsolve
================

# Model
# vera

<!-- badges: start -->

[![Travis build
status](https://travis-ci.org/kylebaron/vera.svg?branch=master)](https://travis-ci.org/kylebaron/vera)
<!-- badges: end -->

## Overview

local sensitivity analysis in R with mrgsolve

## Model

Load the vera package and a PBPK model from the mrgsolve package. We
decrease the tolerance a bit as well as the maximum step size.
Expand All @@ -16,7 +26,7 @@ mod <- modlib(
) %>% obsonly
```

# Scenario
## Scenario

Create a function that uses the model to simulate a certain scenario.
For now, we just simulate a single dose.
Expand All @@ -36,7 +46,7 @@ fun(param(mod),d) %>% plot(Cp+Amu~time)

![](man/figures/README-unnamed-chunk-2-1.png)<!-- -->

# Sensitivity analysis
## Sensitivity analysis

Use `vera::lsa()`. We pick the **parameters** that we want to fiddle
with (`par`):
Expand All @@ -58,7 +68,7 @@ Also specify the **output** that we want to look at (`var`):
out <- lsa(mod, fun, par = "Kpli,Kpmu,Kpad,BW", var = "Cp,Amu", dose = d)
```

# Ouput
## Ouput

The output is long and ready to send in to `ggplot2`.

Expand All @@ -82,7 +92,7 @@ plot(out)

![](man/figures/README-unnamed-chunk-5-1.png)<!-- -->

# Plot with ggplot2
## Plot with ggplot2

``` r
library(ggplot2)
Expand All @@ -99,7 +109,7 @@ filter(out, par=="Kpmu") %>%

<hr>

# More info
## More info

See [inst/doc/about.md (on GitHub only)](inst/doc/about.md) for more
details.
53 changes: 35 additions & 18 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a38867e

Please sign in to comment.