Skip to content

Commit

Permalink
vignette fix
Browse files Browse the repository at this point in the history
  • Loading branch information
philipdelff committed Sep 11, 2023
1 parent a67bf3f commit a11db44
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: NMsim
Type: Package
Title: Nonmem simulation seamlessly integrated in R
Version: 0.0.1.946
Version: 0.0.1.947
Authors@R: c(person("Philip", "Delff", email = "philip@delff.dk",role = c("aut","cre")),
person("Matthew","Fidler", role = c("ctb"), email = "matt.fidler@novartis.com", comment="Co-author on NMreadCov"))
Maintainer: Philip Delff <philip@delff.dk>
Expand Down
25 changes: 15 additions & 10 deletions vignettes/NMsim-simulate.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ Sometimes we want to simulate with some modification to the estimated model. NMs

The SAD study was run with a fast solution formulation. We want to see how a slower absorption rate would affect the PK prediction for the multiple dose regimen. In the model estimate, `TVKA=2.17`. We now try with a four times slower absorption:

```{r}
```{r,eval=FALSE}
## NMscanData(file.mod) |> findCovs()
simres.slowabs <- NMsim(file.mod=file.mod,
data=dat.sim
Expand All @@ -731,11 +731,6 @@ simres.slowabs <- NMsim(file.mod=file.mod,
,list.sections=list(PK=function(x)c(x,"TVKA=TVKA/4","KA=KA/4"))
)
simres.slowabs |> findCovs()
rbind(simres,simres.slowabs) |>
ggplot(aes(TIME,PRED,colour=model))+
geom_line()
```
```{r,include=FALSE,eval=TRUE}
file.fst <- "simulate-results/simres_slowabs.fst"
Expand All @@ -746,6 +741,14 @@ if(run.simuls){
}
```

```{r,eval=TRUE}
simres.slowabs |> findCovs()
rbind(simres,simres.slowabs) |>
ggplot(aes(TIME,PRED,colour=model))+
geom_line()
```

We used `list.sections` to modify the `$PK` section. We used it to
append two lines. We could use it to modify any section in the model,
Expand All @@ -768,10 +771,6 @@ simres.varka <- NMsim(file.mod=file.mod,
,list.sections=list(PK=function(x)c(x,"TVKA=TVKA/KASCALE","KA=KA/KASCALE"))
)
simres.varka |> findCovs(by="KASCALE")
simres.varka
ggplot(simres.varka[EVID==2],aes(TIME,PRED,colour=factor(KASCALE)))+geom_line()+labs(colour="Fold absorption prolongation")
```
```{r,include=FALSE,eval=TRUE}
file.fst <- "simulate-results/simres_varka.fst"
Expand All @@ -782,4 +781,10 @@ if(run.simuls){
}
```

```{r,eval=TRUE}
simres.varka |> findCovs(by="KASCALE")
ggplot(simres.varka[simres.varka$EVID==2,],aes(TIME,PRED,colour=factor(KASCALE)))+geom_line()+labs(colour="Fold absorption prolongation")
```

<!-- ## Using NMsim to validate reimplementations of models -->
Binary file modified vignettes/simulate-results/simres_varka.fst
Binary file not shown.

0 comments on commit a11db44

Please sign in to comment.