SEU_power_comparison_Power_vs_n_GAUSSIAN {RARfreq}R Documentation

Comparison of Powers for Sample Sizes under Different SEU Randomization Methods (Gaussian Responses)

Description

Compares the power of tests under different sample sizes for the same treatment effects and design through matrices and plots.

Usage

SEU_power_comparison_Power_vs_n_GAUSSIAN(n_seq, nstart_seq, mu, sd,
 urn_comp, nstop_mat, replication, group_allo, add_rule_index, add_rule,
 add_rule_full, sig_level)

Arguments

n_seq

A sequence of settings' number of patients. The default is c(50, 100, 150, 200).

nstart_seq

The burn-in sample size of each arm. The default is n_seq/20 = c(2, 5, 8, 10).

mu

A vector of mean response for each treatment arm (where the first element refers to the control arm). The length of mu should correspond to the number of arms. The default is mu = c(4.5,5).

sd

A vector of response standard deviations for each treatment arm. (where the first element refers to the control arm). The length of sd should correspond to the number of arms. The default is sd = c(1.32, 0.72).

urn_comp

A vector of current urn composition. The default is NULL, which indicates no ball in the urn.

nstop_mat

A matrix of sample size stopping caps for each arm. Each row corresponds to each n in n_seq, and each column represents each arm. The trial stops if at least one arm reaches the corresponding cap. The default is NULL, which means no cap.

replication

the number of replications of the simulation. The default is 100.

group_allo

A number or a vector of group size(s) for allocation. If a number is given, the allocation ratios will be updated for each batch of group_allo samples. If a vector is given, the allocation ratios will be updated sequentially in group according to the vector. The group_allo will be applied to all n (from each n_seq). Any value greater than n will be omitted. The default is group_allo=1, which is the same as group_allo = seq(nstart*length(p)+1,n).

add_rule_index

Supply a number of 1 or 2 indicting the addition rules to target allocation functions. 1 = the SEU model targeting Neyman allocation; 2 = the SEU model that assigns probability of 0.6+1/K to winner at each step. The default is 1.

add_rule

Supply a user-specified addition rules function of x.df and arms when add_rule_index is NULL. Default is NULL. (See SEU_GAUSSIAN_raw for details on x.df and arms.)

add_rule_full

Indicator of reference data for updating addition rule. If TRUE, the addition rule is updated by full observation at each group allocation. If FALSE,the addition rule is updated by each group observation. The default is TRUE.

sig_level

Significant level (one-sided). The default is 0.05.

Details

'SEU_power_comparison_Power_vs_n_GAUSSIAN' reads different sample sizes as well as the corresponding burn-in size and outputs allocation, estimated rates and powers.

Value

Examples


## Default setting
SEU_power_comparison_Power_vs_n_GAUSSIAN(
n_seq = seq(from = 50, to = 100, by = 50),
nstart_seq = round(seq(from = 50, to = 100, by = 50) / 20),
mu = c(4.5,5),
sd = c(1.32,0.72),
urn_comp = NULL,
nstop_mat = NULL,
replication = 5,
group_allo = 1,
add_rule_index = 1,
add_rule = NULL,
add_rule_full = NULL,
sig_level = 0.05
)



[Package RARfreq version 0.1.5 Index]