c,WeightedStudySpecification-method | R Documentation |
Given several variations of weights generated from a single
StudySpecification
, combine into a single weight.
## S4 method for signature 'WeightedStudySpecification'
c(x, ..., warn_dichotomy_not_equal = FALSE)
x |
.. a |
... |
any number of additional |
warn_dichotomy_not_equal |
if |
Concatenating WeightedStudySpecification
objects with c()
requires both individual WeightedStudySpecification
objects to come
from the same StudySpecification
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 WeightedStudySpecification
.
WeightedStudySpecification
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
.
A numeric vector
with the weights concatenated in the input
order.
data(simdata)
spec <- rct_spec(z ~ unit_of_assignment(uoa1, uoa2), data = simdata)
w1 <- ate(spec, data = simdata[1:30,])
w2 <- ate(spec, data = simdata[31:40,])
w3 <- ate(spec, data = simdata[41:50,])
c_w <- c(w1, w2, w3)
c(length(w1), length(w2), length(w3), length(c_w))
spec <- rct_spec(dose ~ unit_of_assignment(uoa1, uoa2), data = simdata)
w1 <- ate(spec, data = simdata[1:10, ], dichotomy = dose >= 300 ~ .)
w2 <- ate(spec, data = simdata[11:30, ], dichotomy = dose >= 200 ~ .)
w3 <- ate(spec, data = simdata[31:50, ], dichotomy = dose >= 100 ~ .)
c_w <- c(w1, w2, w3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.