-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New draft vignette around simulation added
- Loading branch information
1 parent
b45e0b2
commit 31ebd7f
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ articles: | |
navbar: ~ | ||
contents: | ||
- analysis_normal | ||
- Simulation_Example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
title: "Simulation Example of Bayesian MCPMod for Continuous Data" | ||
output: rmarkdown::html_vignette | ||
number_sections: true | ||
vignette: > | ||
%\VignetteIndexEntry{Simulation Example of Bayesian MCPMod for Continuous Data} | ||
%\VignetteEngine{knitr::rmarkdown} | ||
%\VignetteEncoding{UTF-8} | ||
--- | ||
|
||
```{r, include = FALSE} | ||
knitr::opts_chunk$set( | ||
collapse = TRUE, | ||
comment = "#>" | ||
) | ||
``` | ||
|
||
```{r setup} | ||
library(BayesianMCPMod) | ||
library(clinDR) | ||
library(dplyr) | ||
set.seed(7015) | ||
``` | ||
|
||
# Background and data | ||
|
||
In this vignette we will show the use of the Bayesian MCPMod package for trial planning for continuous distributed data. | ||
As in [link other vignette] we focus on the indication MDD and make use of historical data that is included in the clinDR package. | ||
More specifically trial results for BRINTELLIX will be utilized to establish an informative prior for the control group. | ||
|
||
# Calculation of a MAP prior | ||
In a first step a meta analytic prior will be calculated using historical data from 4 trials (with main endpoint CfB in MADRS score after 8 weeks). | ||
Please note that only information from the control group will be integrated (leading to an informative multicomponent prior for the control group), while for the active groups a non-informative prior will be specified. | ||
|
||
|
||
```{r Calculation of a MAP prior} | ||
data("metaData") | ||
testdata <- as.data.frame(metaData) | ||
dataset <- filter(testdata, bname == "BRINTELLIX") | ||
histcontrol <- filter(dataset, dose == 0, primtime == 8, indication == "MAJOR DEPRESSIVE DISORDER") | ||
##Create MAP Prior | ||
hist_data <- data.frame( | ||
trial = histcontrol$nctno, | ||
est = histcontrol$rslt, | ||
se = histcontrol$se, | ||
sd = histcontrol$sd, | ||
n = histcontrol$sampsize) | ||
dose_levels <- c(0, 2.5, 5, 10, 20) | ||
prior_list <- getPriorList( | ||
hist_data = hist_data, | ||
dose_levels = dose_levels) | ||
``` | ||
|