Learn R Programming

PropensitySub (version 0.2.0)

expected_feature_diff: Expected number of not optimally balanced features as defined by a threshold

Description

Calculate expected number of features showing balance difference greater than a threshold

Usage

expected_feature_diff(n.feature, n.arm1, n.arm2, threshold)

Arguments

n.feature

(numeric) total number of features

n.arm1

(numeric) number of patients in comparison arm.

n.arm2

(numeric) number of patients in control arm

threshold

(numeric) positive number(s) for threshold to compare to.

Value

return a numeric vector for expected number of unbalanced features

Examples

Run this code
# NOT RUN {
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))
# }

Run the code above in your browser using DataLab