diff --git a/.Rbuildignore b/.Rbuildignore index bda7f19..9e27082 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,13 +1,11 @@ ^.*\.Rproj$ ^\.Rproj\.user$ ^LICENSE$ - docs ^\.github$ ^_pkgdown\.yml$ ^dev$ ^doc$ -^Meta$ ^cran-comments\.md$ ^cran_submission_script\.R$ ^CRAN-SUBMISSION$ diff --git a/.gitignore b/.gitignore index 11be1ca..1505065 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .Rhistory .RData .Ruserdata -/doc/ -/Meta/ +Meta .DS_Store +doc +docs diff --git a/DESCRIPTION b/DESCRIPTION index a35c81f..e012479 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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) @@ -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 diff --git a/R/posterior.R b/R/posterior.R index b9448d3..f2b18e6 100644 --- a/R/posterior.R +++ b/R/posterior.R @@ -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 diff --git a/_pkgdown.yml b/_pkgdown.yml index 61b49a1..1c6e8cd 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -14,3 +14,4 @@ articles: - analysis_normal - Simulation_Example - Comparison_vignette + - Simulation_Comparison diff --git a/inst/WORDLIST b/inst/WORDLIST index af9ba59..3dc509a 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -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 diff --git a/man/getPosterior.Rd b/man/getPosterior.Rd index ac485d9..f8a9d8d 100644 --- a/man/getPosterior.Rd +++ b/man/getPosterior.Rd @@ -30,7 +30,7 @@ posterior_list, a posterior list object is returned with information about (mixt \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) } \examples{ diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index b82b300..fccae97 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -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)) diff --git a/vignettes/Comparison_vignette.qmd b/vignettes/Comparison_vignette.qmd index a37aed3..cc51085 100644 --- a/vignettes/Comparison_vignette.qmd +++ b/vignettes/Comparison_vignette.qmd @@ -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} @@ -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 @@ -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 @@ -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. @@ -2437,7 +2437,7 @@ ggplot(data = data_plot_nsample_non_monotonic, aes(x = sample_sizes_num)) + ``` -### variability sceanrio +### variability scenario ```{r} diff --git a/vignettes/Simulation_Comparison.qmd b/vignettes/Simulation_Comparison.qmd index fd2cac8..4772aa2 100644 --- a/vignettes/Simulation_Comparison.qmd +++ b/vignettes/Simulation_Comparison.qmd @@ -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} @@ -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. diff --git a/vignettes/Simulation_Example.qmd b/vignettes/Simulation_Example.qmd index 432cf28..06abd4b 100644 --- a/vignettes/Simulation_Example.qmd +++ b/vignettes/Simulation_Example.qmd @@ -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} @@ -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( diff --git a/vignettes/analysis_normal.qmd b/vignettes/analysis_normal.qmd index 1ece10d..61f2580 100644 --- a/vignettes/analysis_normal.qmd +++ b/vignettes/analysis_normal.qmd @@ -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} ---