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

View source: R/designHelpers.R

designSafe2HelperR 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

designSavi2Helper(
  samplingResult,
  esMin,
  nPlan,
  ratio,
  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.

nPlan

vector of max length 2 representing the planned sample sizes.

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".

Value

a list of partial results for the design scenario 1a

Functions

  • designSafe2Helper(): Deprecated version of designSavi2Helper

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.