Learn R Programming

GreedyExperimentalDesign (version 1.5.6.1)

optimize_asymmetric_treatment_assignment: Compute Optimal Number of Treatments/Controls

Description

Given a total budget and asymmetric treatment and control costs, calculate the number of treatments and controls that optimize the variance of the estimator. The number of treatments is rounded up by default.

Usage

optimize_asymmetric_treatment_assignment(
  c_treatment = NULL,
  c_control = NULL,
  c_total_max = NULL,
  n = NULL
)

Value

A list with three keys: n, nT, nC plus specified arguments

Arguments

c_treatment

The cost of a treatment assignment. Default is NULL for symmetric costs.

c_control

The cost of a control assignment. Default is NULL for symmetric costs.

c_total_max

The total cost constraint of any allocation. Either this or n must be specified. Default is NULL.

n

The total cost constraint as specified by the total number of subjects. Either this or c_total must be specified. Default is NULL.

Author

Adam Kapelner

Examples

Run this code
 if (FALSE) {
	optimize_asymmetric_treatment_assignment(n = 100) 
 #nT = nC = 50
	optimize_asymmetric_treatment_assignment(n = 100, c_treatment = 2, c_control = 1) 
 #nT = 66, nC = 34
	optimize_asymmetric_treatment_assignment(c_total_max = 50, c_treatment = 2, c_control = 1) 
	}

Run the code above in your browser using DataLab