Given several variations of weights generated from a single
Design, combine into a single weight.
Usage
# S4 method for class 'WeightedDesign'
c(x, ..., warn_dichotomy_not_equal = FALSE)Arguments
- x,
.. a
WeightedDesignobject, typically created fromate()orett()- ...
any number of additional
WeightedDesignobjects with equivalentDesigntoxand eachother- warn_dichotomy_not_equal
if
FALSE(default),WeightedDesigns are considered equivalent even if theirdichotomydiffers. IfTRUE, a warning is produced.
Details
Concatenating WeightedDesign objects with c() requires
both individual WeightedDesign objects to come from the same
Design and have the same
target (e.g all created with ate() or all created with ett(), no
mixing-and-matching). All arguments to c() must be
WeightedDesign.
WeightedDesign objects may be concatenated together even without
having the same @dichotomy slot. This procedure only prompts a
warning for differing dichotomies if the argument warn_dichotomy_not_equal
is set to TRUE.
Examples
data(simdata)
des <- rct_design(z ~ unit_of_assignment(uoa1, uoa2), data = simdata)
w1 <- ate(des, data = simdata[1:30,])
w2 <- ate(des, data = simdata[31:40,])
w3 <- ate(des, data = simdata[41:50,])
c_w <- c(w1, w2, w3)
c(length(w1), length(w2), length(w3), length(c_w))
#> [1] 30 10 10 50
des <- rct_design(dose ~ unit_of_assignment(uoa1, uoa2), data = simdata)
w1 <- ate(des, data = simdata[1:10, ], dichotomy = dose >= 300 ~ .)
w2 <- ate(des, data = simdata[11:30, ], dichotomy = dose >= 200 ~ .)
w3 <- ate(des, data = simdata[31:50, ], dichotomy = dose >= 100 ~ .)
c_w <- c(w1, w2, w3)
