Description Usage Arguments Examples
This function calculate the Type I error rate based on this method and associated Power under various scenarios.
1 | type.1.err(num_sims, a, f, Hyp, p1, p2, beta0, scenario)
|
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 |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.