optimal.ira1r1
finds constrained optimal sample allocation (COSA) solutions for completely randomized controlled trials
where individuals are randomly assigned to treatment and control groups.
COSA can be found in the following forms,
(i) under budgetary constraints given marginal costs per unit,
(ii) under power contraints given marginal costs per unit,
(iii) under MDES contraints given marginal costs per unit, and
(iv) under sample size contraints for one or more levels along with any of the i,ii, or iii options.optimal.ira1r1(cn, cost=NULL, n=NULL,
power=.80, mdes=.25, alpha=.05, two.tail=TRUE,
N0=c(10), ncase=10, gm=10,
constrain="cost", optimizer="auglag_cobyla",
P=.50, g1=0, R12=0)
NULL
.TRUE
for two-tailed hypothesis testing, FALSE
for one-tailed hypothesis testing."cost"
, "power"
, or "mdes"
."auglag_cobyla"
, "auglag_lbfgs"
, "auglag_mma"
, or "auglag_slsqp"
.nloptr
log and output.round.optim
solution. MDES is calculated at the specified power (default .80), and power is calculated at the specified MDES (default .25).mdes.ira1r1, power.ira1r1, mrss.ira1r1
## Not run: ------------------------------------
#
# optimal.ira1r1(cn=1, cost=560,
# constrain="cost")
#
#
## ---------------------------------------------
Run the code above in your browser using DataLab