create.utility.function {bdpopt}  R Documentation 
Create a utility function to be used together with a
normal simulation model object created using create.normal.model
or create.normal.model.from.file
.
create.utility.function(model, n.min, sig.level, safety.max, cE, cS, p, fixed.cost, cost.per.sample)
model 
A model object created using 
n.min 
The minimum group sample size for each phase III group trial required by the regulatory authority in order to consider market approval. 
sig.level 
The significance level used by the regulatory authority when performing the onesided hypothesis tests for acceptable efficacy and safety levels in the phase III trial. 
safety.max 
A parameter defining the maximum safety threshold in the significance test for an acceptable safety level. 
cE 
A constant defining the utility gain per unit of efficacy. 
cS 
A constant defining the utility gain per unit of safety. The
absolute value of this number defines the utility loss, and hence

p 
A number between 0 and 1 which weighs the relative contribution of the observed responses and the true population means to the utility upon regulatory approval. A value of 1 corresponds to no contribution made by the population means. 
fixed.cost 
The fixed cost of performing the phase III trials. 
cost.per.sample 
The cost per observation in the phase III trials. 
The utility function has the form:
RA.decision * gain  trial.cost
where
gain = p * (cE * mean(YE) + cS * mean(YS)) + (1  p) * (cE * mean(muE)
+ cS * mean(muS))
trail.cost = fixed.cost + cost.per.sample * k.III * n.III
An R function to be used together with model
when calling
eval.on.grid
, fit.gpr
, fit.loess
and optimise.eu
.
Sebastian Jobjörnsson jobjorns@chalmers.se