Description Usage Arguments Value Note Examples
View source: R/expected_feature_diff.R
Calculate expected number of features showing balance difference greater than a threshold
1 | expected_feature_diff(n.feature, n.arm1, n.arm2, threshold)
|
n.feature |
( |
n.arm1 |
( |
n.arm2 |
( |
threshold |
( |
return a numeric
vector for expected number of unbalanced features
The output number indicates when running a randomized trial with n.arm1 and n.arm2 samples in two arms and n.feature features are of interest, the expected number of features showing balance difference greater than threshold. p = Prob(|Y|>threshold) is calculated from t distribution. With n.feature features in total, expected number of features with abs value > threshold can be calculated from Binomial(n.feature, p)
1 2 | expected_feature_diff(n.feature = 10, n.arm1 = 240, n.arm2 = 300, threshold = 0.2)
expected_feature_diff(n.feature = 10, n.arm1 = 240, n.arm2 = 300, threshold = c(0.1, 0.25))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.