run.studies: Power Comparisons

View source: R/run.studies.R

run.studiesR Documentation

Power Comparisons

Description

This function runs the case studies included in the package and compares the power of a new test to those included.

Usage

run.studies(
  studies = 1:60,
  types = 1:5,
  data_type = "cont",
  TS,
  TSextra,
  With.p.value = FALSE,
  n,
  alpha = 0.05,
  B = 1000,
  SuppressMessages = TRUE,
  RerunIncludedCases = FALSE
)

Arguments

studies

=1:50, either the names of the studies, or their numbers. If missing all the studies are run.

types

=1:5, either the types of studies, or their numbers. If missing all types are run.

data_type

="cont", continuous or discrete data

TS

routine to calculate test statistics.

TSextra

list passed to TS.

With.p.value

=FALSE does user supplied routine return p values?

n

desired sample size.

alpha

=0.05 type I error

B

= 1000

SuppressMessages

=TRUE

RerunIncludedCases

=FALSE, set to true to verify powers in Rgof::power_study

Details

For details consult vignette("Rgof","Rgof")

Value

A matrix of power values.

Examples

TSextra=list(nbins=5, statistic=FALSE) # Use 5 bins and calculate p values
run.studies(1:2, 1:2, TS=myTS_cont, TSextra=TSextra, With.p.value=TRUE, B=100)

Rgof documentation built on Sept. 13, 2026, 5:06 p.m.