Stratified CMR from a variance rectangle
Source:R/cmr_stratified.R
cmr_stratified_from_rectangle.RdCompute a stratified CMR allocation from a supplied cell-level variance rectangle.
Usage
cmr_stratified_from_rectangle(
rectangle,
strata_share,
control = list(),
max_vertices = 65536L
)Value
A list of class cmr_stratified with assignment shares pi, pi_matrix,
stratum sampling margins, within-stratum treatment margins, CMR certificate
U_CMR, checked rectangle, vertex diagnostics, and solver diagnostics.
See also
Other CMR rules:
binary_rectangle_corners(),
cmr_multiarm(),
cmr_multiarm_from_rectangle(),
cmr_multiple_outcomes(),
cmr_proxy(),
cmr_stratified(),
cmr_two_arm(),
cmr_unbounded(),
cmr_unbounded_from_rectangle(),
print.cmr_two_arm()
Other rectangle helpers:
binary_rectangle_corners(),
cmr_multiarm_from_rectangle(),
cmr_unbounded_from_rectangle(),
folded_binomial_pmf(),
multiarm_variance_objective(),
rectangle_bernoulli_binary(),
rectangle_bounded_two_arm(),
rectangle_multiarm(),
rectangle_multiple_outcomes(),
rectangle_proxy(),
rectangle_stratified(),
rectangle_unbounded(),
stratified_variance_objective(),
variance_bounds_bernoulli_exact(),
variance_bounds_maurer_pontil(),
variance_bounds_unbounded_mom()
Examples
strata_share <- c(A = 0.4, B = 0.6)
rect <- list(
lower = rbind(treatment = c(A = 0.01, B = 0.04),
control = c(A = 0.02, B = 0.03)),
upper = rbind(treatment = c(A = 0.08, B = 0.12),
control = c(A = 0.09, B = 0.10))
)
cmr_stratified_from_rectangle(rect, strata_share)
#> <cmr_stratified>
#> pi: 1:A=0.161469, 0:A=0.186198, 1:B=0.344152, 0:B=0.30818
#> U_CMR: 0.02525