designSavi1aHelper: Helper function that extract the results for the design...

View source: R/designHelpers.R

designSafe1aHelperR Documentation

Helper function that extract the results for the design scenario 1a: Target nPlan

Description

Helper function that extract the results for the design scenario 1a: Target nPlan

Usage

designSavi1aHelper(
  samplingResult,
  esMin,
  power,
  ratio,
  beta = NULL,
  testType = c("oneSample", "paired", "twoSample")
)

Arguments

samplingResult

output from sampling functions such as computeNPlanSaviZ and computeNPlanSaviT

esMin

numeric that defines the minimal clinically relevant effect size, e.g. meanDiffMin for the z-test, or deltaMin for the t-test.

beta

numerical in (0,1). Old parameter now replaced by the power parameter

ratio

numeric > 0 representing the randomisation ratio of condition 2 over condition 1. If testType is not equal to "twoSample", or if nPlan is of length(1) then ratio=1.

testType

either one of "oneSample", "paired", "twoSample".

power

numeric in (0, 1) that specifies the desirable power necessary to calculate both "n" and the minimum detectable effect size.

Value

a list of partial results for the design scenario 1a

Functions

  • designSafe1aHelper(): Deprecated version of designSavi1aHelper

Examples


samplingResult <- computeNPlanSaviZ(0.7, nSim=10, nMax=20)
result <- designSavi1aHelper(samplingResult, 0.7, 0.2, 1)

safestats documentation built on Sept. 6, 2026, 1:06 a.m.