This function is called by make_psa_obj
,
create_dsa_oneway
,
and create_dsa_oneway
, and checks the structure of
each of the arguments before creating an SA object.
create_sa(
parameters,
parnames,
effectiveness,
strategies,
cost,
currency,
other_outcome
)
a data frame with parameter values for each model run. Each
column should represent a different parameter, and each row should represent a
simulation (in the same order as cost
and effectiveness
)
names for the parameters.
vector with the names of the strategies. Due to requirements in
certain uses of this vector, this function uses make.names
to modify
strategy names as necessary. It is strongly suggested that you follow the rules
in the make.names
help page, to avoid unexpected errors.
data frames containing data for costs,
effectiveness or another outcome (user-defined), respectively.
Each simulation should be a row of the data frame, and each strategy should be a column.
Naming the columns of the data frames is not necessary, as they will be renamed with
the strategies
vector.
symbol for the currency being used (ex. "$", "<U+00A3>")
returns "sa" sensitivity analysis object.