make_psa_obj {dampack}R Documentation

Create a PSA object

Description

Creates an object to hold probabilistic sensitivity analysis data, while checking the data for validity. The object can then be used for many standard cost-effectiveness analyses (see Details below).

Usage

make_psa_obj(
  cost,
  effectiveness,
  parameters = NULL,
  strategies = NULL,
  currency = "$",
  other_outcome = NULL
)

Arguments

cost

For the data.frame, each simulation should be a row 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.

effectiveness

For the data.frame, each simulation should be a row 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.

parameters

Data frame with values for each simulation (rows) and parameter (columns). The column names should be the parameter names.

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.

currency

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

other_outcome

data.frame containing values for another user-defined outcome. 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.

Details

The PSA object forms the backbone of one part of the dampack package.

A scatterplot of the cost-effectiveness plane may be shown by running plot on the output of make_psa_obj.

Using this object, you may calculate:

In addition, the PSA may be converted to a base-case analysis by using summary on the PSA object. The output of summary can be used in calculate_icers.

Value

An object of class psa

See Also

summary.psa, plot.psa

Examples

# psa input provided with package
data("example_psa")
psa <- make_psa_obj(example_psa$cost, example_psa$effectiveness,
                    example_psa$parameters, example_psa$strategies)

# custom print and summary methods
print(psa)
summary(psa)

# custom plot method; see ?plot.psa for options
plot(psa)


[Package dampack version 1.0.1 Index]