computePowerBySampleSize: Compute the Power Over a Grid of Sample Size Values

Description Usage Arguments Details Value See Also Examples

View source: R/compute-power-by-sample-size.R

Description

Computes the power over a grid of sample size values.

Usage

1
computePowerBySampleSize(V, Delta, min_Delta, alpha = 0.05, sample_size_grid)

Arguments

V

The covariance matrix of mean EDTR estimators.

Delta

The vector of effect sizes with a zero indicating the best EDTR.

min_Delta

The minimum desired detectable effect size.

alpha

The Type I error rate for not including the true best EDTR.

sample_size_grid

The vector of sample sizes

Details

It employs common random variables to reduce the variance. See computePower for more details.

Value

A vector of power for each sample size in the given grid.

See Also

computePower

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  
  V <- rbind(c(1, 0.3, 0.3, 0.3),
             c(0.3, 1, 0.3, 0.3),
             c(0.3, 0.3, 1, 0.3),
             c(0.3, 0.3, 0.3, 1))
  computePowerBySampleSize(V,
                           Delta = c(0, 0.2, 0.6, 0.3),
                           min_Delta = 0.3,
                           sample_size_grid = seq(50,300, 50))
  

smartsizer documentation built on Jan. 6, 2021, 9:08 a.m.