1111# ' for decision-making
1212# ' @author Klaus Kähler Holst, Benedikt Sommer
1313# ' @examples
14- # ' \dontrun{
14+ # ' \dontrun{ # don't run because of high computational time
1515# ' trial <- Trial$new(
1616# ' covariates = \(n) data.frame(a = rbinom(n, 1, 0.5), x = rnorm(n)),
1717# ' outcome = setargs(outcome_count, par = c(1, 0.5, 1), overdispersion = 0.7)
@@ -320,6 +320,7 @@ Trial <- R6::R6Class("Trial", #nolint
320320 # ' the simulation. The return object is also assigned to the `estimates`
321321 # ' field of this Trial class object (see examples).
322322 # ' @examples
323+ # ' \dontrun{ # don't run because of high computational time
323324 # ' # future::plan("multicore")
324325 # ' trial <- Trial$new(
325326 # ' covariates = \(n) data.frame(a = rbinom(n, 1, 0.5)),
@@ -351,6 +352,7 @@ Trial <- R6::R6Class("Trial", #nolint
351352 # '
352353 # ' # supplying another estimator
353354 # ' trial$run(n = 100, R = 50, estimators = est_glm(robust = FALSE))
355+ # ' }
354356 run = function (n , R = 100 , estimators = NULL , ... ) {
355357 return (trial_run(self , .private = private , n = n , R = R ,
356358 estimators = estimators , ... )
@@ -364,6 +366,7 @@ Trial <- R6::R6Class("Trial", #nolint
364366 # ' estimator. The behavior of passing arguments to lower level functions is
365367 # ' identical to [Trial$run()][Trial].
366368 # ' @examples
369+ # ' \dontrun{ # don't run because of high computational time
367370 # ' # toy examples with small number of Monte-Carlo replicates
368371 # ' # future::plan("multicore")
369372 # ' trial <- Trial$new(
@@ -387,6 +390,7 @@ Trial <- R6::R6Class("Trial", #nolint
387390 # ' # supplying estimators to overrule previously set estimators
388391 # ' trial$estimate_power(n = 100, R = 20,
389392 # ' estimators = list(est_glm(), est_adj()))
393+ # ' }
390394 # ' @return numeric
391395 estimate_power = function (n , R = 100 , estimators = NULL ,
392396 summary.args = list (), ... ) {
@@ -434,7 +438,7 @@ Trial <- R6::R6Class("Trial", #nolint
434438 # ' @return samplesize_estimate S3 object
435439 # ' @author Klaus Kähler Holst
436440 # ' @examples
437- # ' \dontrun{
441+ # ' \dontrun{ # don't run because of high computational time
438442 # ' trial <- Trial$new(
439443 # ' covariates = \(n) data.frame(a = rbinom(n, 1, 0.5)),
440444 # ' outcome = \(data, ate, sd) with(data, rnorm(nrow(data), a * ate, sd)),
@@ -449,11 +453,11 @@ Trial <- R6::R6Class("Trial", #nolint
449453 # '
450454 # ' # reduce number of iterations for bisection step but keep R = 100
451455 # ' # (default value)
452- # ' trial$estimate_samplesize(bisection.control = list(niter = 2))
456+ # ' # trial$estimate_samplesize(bisection.control = list(niter = 2))
453457 # '
454458 # ' # reduce significance level from 0.05 to 0.025, but keep alternative as
455459 # ' # before
456- # ' trial$estimate_samplesize(summary.args = list(level = 0.025))
460+ # ' # trial$estimate_samplesize(summary.args = list(level = 0.025))
457461 # ' }
458462 estimate_samplesize = function (
459463 ... ,
0 commit comments