sample_size_norm_local {adpss}R Documentation

Calculate sample size or power for a locally efficient adaptive design.

Description

sample_size_norm_local calculates the power if the time of the final analysis is given and otherwise the sample size. The computed power for effect_size is an approximate lower bound. Sample size is also calculated on the basis of the bound.

Usage

sample_size_norm_local(
  overall_sig_level = 0.025,
  min_effect_size = 1,
  sample_size = TRUE,
  effect_size = 1,
  time = 0,
  target_power = 0.8,
  final_time = 0,
  tol_sample_size = 1e-08,
  input_check = TRUE
)

Arguments

overall_sig_level

Overall significance level in (0, 1). Default is 0.025.

min_effect_size

The minimum effect size. It should be positive. The working test will be constructed to have the power of 1 - work_beta for this effect size. Default is 1.

sample_size

If TRUE, the function will return the sample size required by the locally efficient adaptive design to have the power of target_power. If FALSE, the function will return the power when the final interim analysis and the final analysis are conducted at time and final_time, respectively.

effect_size

The effect size, on the basis of which the power or sample size calculation will be performed. In locally efficient adaptive designs, any real value no less than min_effect_size / 2 is allowed.

time

The time of the current analysis.

target_power

The power, on the basis of which the sample size calculation will be performed.

final_time

The time of the final analysis.

tol_sample_size

The precision in calculation of the sample size.

input_check

Indicate whether or not the arguments input by user contain invalid values.

Value

It returns the sample size (when sample_size = TRUE) or the power (when sample_size = FALSE).

See Also

adaptive_analysis_norm_local for example of this function.


[Package adpss version 0.1.2 Index]