create_sa: A generic sensitivity analysis object

Description Usage Arguments Value

View source: R/create_sa.R

Description

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.

Usage

1
2
3
4
5
6
7
8
9
create_sa(
  parameters,
  parnames,
  effectiveness,
  strategies,
  cost,
  currency,
  other_outcome
)

Arguments

parameters

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)

parnames

names for the parameters.

strategies

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.

cost, effectiveness, other_outcome

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.

currency

symbol for the currency being used (ex. "$", "£")

Value

returns "sa" sensitivity analysis object.


DARTH-git/dampack documentation built on Aug. 8, 2021, 2:58 a.m.