Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

create_sa

A generic sensitivity analysis object


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

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.


dampack

Decision-Analytic Modeling Package

v1.0.0
GPL-3
Authors
Fernando Alarid-Escudero [aut], Greg Knowlton [aut, cre], Caleb Easterly [aut], Eva Enns [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.