Skip to content

Commit

Permalink
adjusted issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyarz committed Aug 12, 2024
1 parent d1f4527 commit c8c6019
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 30 deletions.
2 changes: 0 additions & 2 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
^.*\.Rproj$
^\.Rproj\.user$
^LICENSE$

docs
^\.github$
^_pkgdown\.yml$
^dev$
^doc$
^Meta$
^cran-comments\.md$
^cran_submission_script\.R$
^CRAN-SUBMISSION$
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.Rhistory
.RData
.Ruserdata
/doc/
/Meta/
Meta
.DS_Store
doc
docs
18 changes: 9 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Description: Bayesian MCPMod (Fleischer et al. (2022)
Estimated dose-response relationships can be bootstrapped and
visualized.
License: Apache License (>= 2)
URL: https://github.com/Boehringer-Ingelheim/BayesianMCPMod
URL: https://boehringer-ingelheim.github.io/BayesianMCPMod/, https://github.com/Boehringer-Ingelheim/BayesianMCPMod
BugReports: https://github.com/Boehringer-Ingelheim/BayesianMCPMod/issues
Depends:
R (>= 4.2)
Expand All @@ -40,20 +40,20 @@ Imports:
RBesT,
stats
Suggests:
reactable,
tibble,
quarto,
clinDR,
dplyr,
knitr,
rmarkdown,
MCPModPack,
data.table,
doFuture,
quarto,
doRNG,
dplyr,
kableExtra,
knitr,
MCPModPack,
reactable,
rmarkdown,
spelling,
testthat (>= 3.0.0)
testthat (>= 3.0.0),
tibble
VignetteBuilder: quarto
Config/testthat/edition: 3
Encoding: UTF-8
Expand Down
2 changes: 1 addition & 1 deletion R/posterior.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' @description Either the patient level data or both mu_hat as well as S_hat must to be provided.
#' If patient level data is provided mu_hat and S_hat are calculated within the function using a linear model.
#' This function calculates the posterior distribution. Depending on the input for S_hat this step is either performed for every dose group independently via the RBesT function postmix() or the mvpostmix() function of the dosefinding package is utilized.
#' This function calculates the posterior distribution. Depending on the input for S_hat this step is either performed for every dose group independently via the RBesT function postmix() or the mvpostmix() function of the DoseFinding package is utilized.
#' In the latter case conjugate posterior mixture of multivariate normals are calculated (DeGroot 1970, Bernardo and Smith 1994)
#'
#' @param prior_list a prior list with information about the prior to be used for every dose group
Expand Down
1 change: 1 addition & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ articles:
- analysis_normal
- Simulation_Example
- Comparison_vignette
- Simulation_Comparison
19 changes: 19 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,22 @@ sd
se
simulateData
summand
AFM
bayesian
BMCPMod
BRINTELLIX
clinDR
colours
dr
eqn
getBootstrapSamples
getPriorList
Jl
MADRS
MCPModPack
MDD
mvpostmix
normals
powMCT
DeGroot
sigEMAX
2 changes: 1 addition & 1 deletion man/getPosterior.Rd

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

2 changes: 1 addition & 1 deletion tests/testthat/setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ getPriorList <- function (

gmap <- RBesT::gMAP(
formula = cbind(est, se) ~ 1 | trial,
family = gaussian,
weights = hist_data$n,
data = hist_data,
family = gaussian,
beta.prior = cbind(0, 100 * sd_tot),
tau.dist = "HalfNormal",
tau.prior = cbind(0, sd_tot / 4))
Expand Down
12 changes: 6 additions & 6 deletions vignettes/Comparison_vignette.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ format:
warning: false
vignette: >
%\VignetteIndexEntry{Simulation Example of Bayesian MCPMod and MCPMod}
%\VignetteEncoding{UTF-8}
%\VignetteEngine{quarto::html}
%\VignetteEngine{quarto::html}
%\VignetteEncoding{UTF-8}
---

```{r setup, include=FALSE, eval=TRUE, message=FALSE, warning=FALSE}
Expand Down Expand Up @@ -805,7 +805,7 @@ kable(results_monotonic_MCP_nsample)%>%

### varying expected effect for maximum dose

For the simulations of the non-monotonic scenario, the R package 'Dosefinding' was used instead of 'MCPModPack'. In particular the powMCT function was utilized to calculate success probabilities for the various scenarios.
For the simulations of the non-monotonic scenario, the R package 'DoseFinding' was used instead of 'MCPModPack'. In particular the powMCT function was utilized to calculate success probabilities for the various scenarios.

```{r}
# linear with DoseFinding package
Expand Down Expand Up @@ -1585,7 +1585,7 @@ uninf_prior_list <- list(

To calculate success probabilities for the different assumed dose-response models and the specified trial design we will apply the assessDesign function.

## Minimal scnenario
## Minimal scenario
### varying expected effect for maximum dose


Expand Down Expand Up @@ -2058,7 +2058,7 @@ var_nsample_Bay$kable_result

# Comparison

In the following, the comparisons between the success probabilities (i.e.power values for frequentist set-up) of various scenarios and differnt parameters are visualized.
In the following, the comparisons between the success probabilities (i.e.power values for frequentist set-up) of various scenarios and different parameters are visualized.

The following plots show the difference between the results from MCPModPack and BayesianMCPMod. The results of MCPModPack are shown as a line and the difference to the result with BayesianMCPMod is presented as a bar. The results for the different assumed true dose-response models (that were the basis for simulating the data) are shown in different colours.

Expand Down Expand Up @@ -2437,7 +2437,7 @@ ggplot(data = data_plot_nsample_non_monotonic, aes(x = sample_sizes_num)) +
```

### variability sceanrio
### variability scenario

```{r}
Expand Down
6 changes: 3 additions & 3 deletions vignettes/Simulation_Comparison.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ format:
warning: false
vignette: >
%\VignetteIndexEntry{Comparison of Bayesian MCPMod and MCPMod}
%\VignetteEncoding{UTF-8}
%\VignetteEngine{quarto::html}
%\VignetteEngine{quarto::html}
%\VignetteEncoding{UTF-8}
---

```{r setup, include=FALSE, eval=TRUE, message=FALSE, warning=FALSE}
Expand Down Expand Up @@ -557,7 +557,7 @@ monotonic_Bay <- print_result_Bay_max_eff(results_monotonic_Bay, c(monotonic_sce

# Comparison

In the following, the comparisons between the success probabilities (i.e.power values for frequentist set-up) of various scenarios and differnt parameters are visualized.
In the following, the comparisons between the success probabilities (i.e.power values for frequentist set-up) of various scenarios and different parameters are visualized.

The following plots show the difference between the results from MCPModPack and BayesianMCPMod. The results of MCPModPack are shown as a line and the difference to the result with BayesianMCPMod is presented as a bar. The results for the different assumed true dose-response models (that were the basis for simulating the data) are shown in different colours.

Expand Down
6 changes: 3 additions & 3 deletions vignettes/Simulation_Example.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ format:
warning: false
vignette: >
%\VignetteIndexEntry{Simulation Example of Bayesian MCPMod for Continuous Data}
%\VignetteEncoding{UTF-8}
%\VignetteEngine{quarto::html}
%\VignetteEngine{quarto::html}
%\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
Expand Down Expand Up @@ -103,7 +103,7 @@ prior_list <- list(

# Specification of new trial design

For the hypothetical new trial, we plan with 4 active dose levels \eqn{2.5, 5, 10, 20} and we specify a broad set of potential dose-response relationships, including a linear, an exponential, an emax and 2 sigEMax models.
For the hypothetical new trial, we plan with 4 active dose levels \eqn{2.5, 5, 10, 20} and we specify a broad set of potential dose-response relationships, including a linear, an exponential, an emax and 2 sigEMAX models.
Furthermore, we assume a maximum effect of -3 on top of control (i.e. assuming that active treatment can reduce the MADRS score after 8 weeks by up to 15.8) and plan a trial with 80 patients for all active groups and 60 patients for control.
```{r}
exp <- DoseFinding::guesst(
Expand Down
4 changes: 2 additions & 2 deletions vignettes/analysis_normal.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ format:
warning: false
vignette: >
%\VignetteIndexEntry{Analysis Example of Bayesian MCPMod for Continuous Data}
%\VignetteEncoding{UTF-8}
%\VignetteEngine{quarto::html}
%\VignetteEngine{quarto::html}
%\VignetteEncoding{UTF-8}
---


Expand Down

0 comments on commit c8c6019

Please sign in to comment.