diff --git a/DESCRIPTION b/DESCRIPTION index 313492c..e15756a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -24,7 +24,7 @@ LazyData: true Roxygen: list(markdown = TRUE) RoxygenNote: 7.2.3 Imports: - DoseFinding, + DoseFinding (>= 1.1-1), ggplot2, stats, RBesT, diff --git a/R/BMCPMod.R b/R/BMCPMod.R index e9e6f98..f3f3de6 100644 --- a/R/BMCPMod.R +++ b/R/BMCPMod.R @@ -5,9 +5,13 @@ #' @param n_patients Vector specifying the planned number of patients per dose group #' @param mods An object of class "Mods" as specified in the Dosefinding package. #' @param prior_list a prior_list object specifying the utilized prior for the different dose groups +#' @param sd tbd #' @param n_sim number of simulations to be performed #' @param alpha_crit_val critical value to be used for the testing (on the probability scale) #' @param simple boolean variable, defining whether simplified fit will be applied. Passed to the getModelFits function. Default FALSE. +#' @param reestimate tbd Default FALSE +#' @param contr tbd Default NULL +#' @param dr_means tbd Default NULL #' #' @export assessDesign <- function ( @@ -98,8 +102,10 @@ assessDesign <- function ( #' #' @param mods An object of class "Mods" as specified in the Dosefinding package. #' @param dose_levels vector containing the different doseage levels. -#' @param dose_weights Vector specifying weights for the different doses -#' @param prior_list a prior_list object +#' @param dose_weights Vector specifying weights for the different doses. Default NULL +#' @param prior_list a prior_list object. Default NULL +#' @param sd_posterior tbd. Default NULL +#' @param se_new_trial tbd. Default NULL #' #' @return contr Object of class ‘⁠optContr⁠’. A list containing entries contMat and muMat, and CorrMat. Specified in the Dosefinding package. #' @@ -196,7 +202,7 @@ getCritProb <- function ( doses = dose_levels, w = dose_weights) - crit_prob <- pnorm(DoseFinding:::critVal( + crit_prob <- stats::pnorm(DoseFinding::critVal( corMat = contr$corMat, alpha = alpha_crit_val, df = 0, @@ -212,7 +218,7 @@ getCritProb <- function ( #' #' @param posterior_list a getPosterior object #' @param contr a getContrMat object, contrast matrix to be used for the testing step. -#' @param crit_prob a getCritProb object +#' @param crit_prob_adj a getCritProb object #' @param simple boolean variable, defining whether simplified fit will be applied. Passed to the getModelFits function. Default FALSE. #' #' @return bmcpmod test result as well as modelling result. @@ -227,7 +233,7 @@ performBayesianMCPMod <- function ( ) { - if (class(posterior_list) == "postList") { + if (inherits(posterior_list, "postList")) { posterior_list <- list(posterior_list) @@ -310,7 +316,7 @@ addSignificance <- function ( #' #' @param posterior_list a getPosterior object #' @param contr a getContrMat object, contrast matrix to be used for the testing step. -#' @param crit_prob a getCritProb object, specifying the critical value to be used for the testing (on the probability scale) +#' @param crit_prob_adj a getCritProb object, specifying the critical value to be used for the testing (on the probability scale) #' #' @return b_mcp test result #' @@ -323,7 +329,7 @@ performBayesianMCP <- function( ) { - if (class(posterior_list) == "postList") { + if (inherits(posterior_list, "postList")) { posterior_list <- list(posterior_list) diff --git a/R/bootstrapping.R b/R/bootstrapping.R index ec82139..0957703 100644 --- a/R/bootstrapping.R +++ b/R/bootstrapping.R @@ -1,10 +1,10 @@ #' @title getBootstrapQuantiles #' #' @param model_fits tbd +#' @param quantiles tbd #' @param n_samples tbd -#' @param alpha tbd -#' @param avg_fit tbd #' @param doses tbd +#' @param avg_fit tbd #' #' @return tbd #' @export diff --git a/R/posterior.R b/R/posterior.R index 2823f6f..599be98 100644 --- a/R/posterior.R +++ b/R/posterior.R @@ -3,11 +3,12 @@ #' #' @description Either the patient level data or both the mu_hat as well as the sd_hat must to be provided. #' -#' @param data dataframe containing the information of dose and response. -#' Also a simulateData object can be provided. #' @param prior_list prior_list object +#' @param data dataframe containing the information of dose and response. Default NULL +#' Also a simulateData object can be provided. #' @param mu_hat vector of estimated mean values -#' @param sd_hat vector of estimated standard deviations. +#' @param se_hat vector of estimated standard deviations. +#' @param calc_ess tbd. Default NULL #' #' @export getPosterior <- function( diff --git a/R/simulation.R b/R/simulation.R index 15c9149..65330cd 100644 --- a/R/simulation.R +++ b/R/simulation.R @@ -10,6 +10,7 @@ #' @param true_model Default value is NULL. #' Assumed true underlying model. Provided via a String. e.g. "emax". #' In case of NULL, all dose-response models, included in the mods input parameter will be used. +#' @param dr_means tbd. Default NULL. #' #' @return sim_data one list object, containing patient level simulated data for all assumed true models. #' Also providing information about simulation iteration, patient number as well as dosage levels. diff --git a/man/assessDesign.Rd b/man/assessDesign.Rd index 9b0d9a9..91e3392 100644 --- a/man/assessDesign.Rd +++ b/man/assessDesign.Rd @@ -25,11 +25,19 @@ assessDesign( \item{prior_list}{a prior_list object specifying the utilized prior for the different dose groups} +\item{sd}{tbd} + \item{n_sim}{number of simulations to be performed} \item{alpha_crit_val}{critical value to be used for the testing (on the probability scale)} \item{simple}{boolean variable, defining whether simplified fit will be applied. Passed to the getModelFits function. Default FALSE.} + +\item{reestimate}{tbd Default FALSE} + +\item{contr}{tbd Default NULL} + +\item{dr_means}{tbd Default NULL} } \description{ This function performs simulation based trial design evaluations for a set of specified dose-response models diff --git a/man/getBootstrapQuantiles.Rd b/man/getBootstrapQuantiles.Rd index 11f88a2..d7f8ecd 100644 --- a/man/getBootstrapQuantiles.Rd +++ b/man/getBootstrapQuantiles.Rd @@ -15,13 +15,13 @@ getBootstrapQuantiles( \arguments{ \item{model_fits}{tbd} +\item{quantiles}{tbd} + \item{n_samples}{tbd} \item{doses}{tbd} \item{avg_fit}{tbd} - -\item{alpha}{tbd} } \value{ tbd diff --git a/man/getContr.Rd b/man/getContr.Rd index b1185c6..0e64c19 100644 --- a/man/getContr.Rd +++ b/man/getContr.Rd @@ -18,9 +18,13 @@ getContr( \item{dose_levels}{vector containing the different doseage levels.} -\item{dose_weights}{Vector specifying weights for the different doses} +\item{dose_weights}{Vector specifying weights for the different doses. Default NULL} -\item{prior_list}{a prior_list object} +\item{prior_list}{a prior_list object. Default NULL} + +\item{sd_posterior}{tbd. Default NULL} + +\item{se_new_trial}{tbd. Default NULL} } \value{ contr Object of class ‘⁠optContr⁠’. A list containing entries contMat and muMat, and CorrMat. Specified in the Dosefinding package. diff --git a/man/getPosterior.Rd b/man/getPosterior.Rd index 084d5e8..44e7560 100644 --- a/man/getPosterior.Rd +++ b/man/getPosterior.Rd @@ -15,12 +15,14 @@ getPosterior( \arguments{ \item{prior_list}{prior_list object} -\item{data}{dataframe containing the information of dose and response. +\item{data}{dataframe containing the information of dose and response. Default NULL Also a simulateData object can be provided.} \item{mu_hat}{vector of estimated mean values} -\item{sd_hat}{vector of estimated standard deviations.} +\item{se_hat}{vector of estimated standard deviations.} + +\item{calc_ess}{tbd. Default NULL} } \description{ Either the patient level data or both the mu_hat as well as the sd_hat must to be provided. diff --git a/man/performBayesianMCP.Rd b/man/performBayesianMCP.Rd index 86ad352..02dd385 100644 --- a/man/performBayesianMCP.Rd +++ b/man/performBayesianMCP.Rd @@ -11,7 +11,7 @@ performBayesianMCP(posterior_list, contr, crit_prob_adj) \item{contr}{a getContrMat object, contrast matrix to be used for the testing step.} -\item{crit_prob}{a getCritProb object, specifying the critical value to be used for the testing (on the probability scale)} +\item{crit_prob_adj}{a getCritProb object, specifying the critical value to be used for the testing (on the probability scale)} } \value{ b_mcp test result diff --git a/man/performBayesianMCPMod.Rd b/man/performBayesianMCPMod.Rd index d3ce9a5..6359109 100644 --- a/man/performBayesianMCPMod.Rd +++ b/man/performBayesianMCPMod.Rd @@ -11,9 +11,9 @@ performBayesianMCPMod(posterior_list, contr, crit_prob_adj, simple = FALSE) \item{contr}{a getContrMat object, contrast matrix to be used for the testing step.} -\item{simple}{boolean variable, defining whether simplified fit will be applied. Passed to the getModelFits function. Default FALSE.} +\item{crit_prob_adj}{a getCritProb object} -\item{crit_prob}{a getCritProb object} +\item{simple}{boolean variable, defining whether simplified fit will be applied. Passed to the getModelFits function. Default FALSE.} } \value{ bmcpmod test result as well as modelling result. diff --git a/man/simulateData.Rd b/man/simulateData.Rd index ae01d13..1b55e08 100644 --- a/man/simulateData.Rd +++ b/man/simulateData.Rd @@ -30,6 +30,8 @@ Default is 1000} \item{true_model}{Default value is NULL. Assumed true underlying model. Provided via a String. e.g. "emax". In case of NULL, all dose-response models, included in the mods input parameter will be used.} + +\item{dr_means}{tbd. Default NULL.} } \value{ sim_data one list object, containing patient level simulated data for all assumed true models.