type.1.err: Operating characteristics of the Relative time method

Description Usage Arguments Examples

View source: R/Type_1_error.R

Description

This function calculate the Type I error rate based on this method and associated Power under various scenarios.

Usage

1
type.1.err(num_sims, a, f, Hyp, p1, p2, beta0, scenario)

Arguments

num_sims

numeric variable

a

numeric variable

f

numeric variable

Hyp

Binary variable (0/1); 0 indicate the Type I error rate and 1 Indicate the associated Power

p1

numeric variable

p2

numeric variable

beta0

numeric variable

scenario

numeric variable between 1 and 4

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
num_sims <- 10000
sims <- plyr::ldply(1:num_sims, type.1.err, a = 12, f=12, Hyp=0,p1=0.1, p2=0.9,beta0 = 0.25,scenario = 1)
result <- apply(sims, MARGIN = 2 , FUN=mean, na.rm = TRUE)
result
## Not run: 
num_sims <- 10000
sims <- plyr::ldply(1:num_sims, type.1.err, a = 12, f=12, Hyp=0,p1=0.1, p2=0.9,beta0 = 0.25,scenario = 1)
result <- apply(sims, MARGIN = 2 , FUN=mean, na.rm = TRUE)
result

## End(Not run)

Palash63/RelativeM documentation built on Dec. 18, 2021, 6:39 a.m.