plotHistogramDistributionStoppingTimes {safestats}R Documentation

Plots the Histogram of Stopping Times

Description

Helper function to display the histogram of stopping times.

Usage

plotHistogramDistributionStoppingTimes(
  safeSim,
  nPlan,
  deltaTrue,
  showOnlyNRejected = FALSE,
  nBin = 25L,
  ...
)

Arguments

safeSim

A safeSim object, returned from replicateTTests.

nPlan

numeric > 0, the planned sample size(s).

deltaTrue

numeric, that represents the true underlying standardised effect size delta.

showOnlyNRejected

logical, when TRUE discards the cases that did not reject.

nBin

numeric > 0, the minimum number of bins in the histogram.

...

further arguments to be passed to or from methods.

Value

a histogram object, and called for its side-effect to plot the histogram.

Examples

# Design safe test
alpha <- 0.05
beta <- 0.20
designObj <- designSafeT(1, alpha=alpha, beta=beta)

# Design frequentist test
freqObj <- designFreqT(1, alpha=alpha, beta=beta)

# Simulate under the alternative with deltaTrue=deltaMin
simResults <- replicateTTests(nPlan=designObj$nPlan, deltaTrue=1, parameter=designObj$parameter,
nPlanFreq=freqObj$nPlan)

plotHistogramDistributionStoppingTimes(
  simResults$safeSim, nPlan = simResults$nPlan,
  deltaTrue = simResults$deltaTrue)

[Package safestats version 0.8.7 Index]