Description Usage Arguments Value Methods (by class) Examples
View source: R/ceamodel_setup.R
Creates a ceamodel class object that specifies cost and effect data as well as intervention specifiers for a list of individual entities. The model may also specify covariate values to be used in estimating incremental costs and effects.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | cea_setup(x, ...)
## Default S3 method:
cea_setup(cst, eff, intv, covt = c(), covt_cst = c(),
covt_eff = c(), eff_more_better = TRUE, cst_char, eff_char, intv_char,
covt_char, call.txt, incremental = TRUE, cost_order = TRUE,
cst_type = "gaussian", eff_type = "gaussian")
## S3 method for class 'data.frame'
cea_setup(cea_data = list(), cst_char, eff_char,
intv_char, covt_char_vec = c(), covt_cst = c(), covt_eff = c(),
eff_more_better = TRUE, incremental = TRUE, cost_order = TRUE,
cst_type = "gaussian", eff_type = "gaussian")
## S3 method for class 'formula'
cea_setup(formula_cea = formula, intv, cea_data = list(),
eff_more_better = TRUE, incremental = TRUE, cost_order = TRUE,
cst_type = "gaussian", eff_type = "gaussian")
|
x |
an R object. |
cst |
A vector of cost values. |
eff |
A vector of effect values. |
intv |
A vector of intervention or program assignment/membership. The vectors cst, eff, and intv must have the same length, greater than one. |
covt |
If provided, a vector (or matrix) of covariate values. covt must have the same number of rows as cst and eff. The number of columns is equal to the number of unique covariates. |
covt_cst |
If provided, a vector of integers. The integers correspond to column numbers of covt for which the covariates will be used for costs. |
covt_eff |
If provided, a vector of integers. The integers correspond to column numbers of covt for which the covariates will be used for effects. |
eff_more_better |
If TRUE, a greater value for effects indicates a better outcome. If FALSE, a smaller value for effects indicates a better outcome. Default is TRUE. |
cst_char |
A character string representing the preferred name of the cost variable (values in cst). |
eff_char |
A character string representing the preferred name of the effect variable (values in eff). |
intv_char |
A character string representing the preferred name of the intervention variable (values in intv). |
covt_char |
A character string (or vector of character strings) representing the preferred name of the covariate variables. The number of strings provided should equal the number of columns in covt. |
call.txt |
Only supplied when one of the cea_setup methods calls this default function. |
incremental |
Defaults to TRUE and runs incremental analysis upon setup. |
cost_order |
If true, the order of options in an ICER table will be by increasing average cost. If false, the order of options in an ICER table will be by increasing average effect. |
cst_type |
Defaults to linear regression (gaussian) but can be set to any family object available to glm. |
eff_type |
Defaults to linear regression (gaussian) but can be set to any family object available to glm. |
An object of class "ceamodel".
default
: Default S3 method
data.frame
: S3 method for class 'data.frame'
formula
: S3 method for class 'formula'
1 2 3 4 5 6 7 8 | ## Data Frame examples: basic, male as covariate for effects only
ceamodel <- cea_setup(clintrial_cea, "cost", "qaly", "treat")
ceamodel <- cea_setup(clintrial_cea, "cost", "qaly", "treat",
covt_eff = "male")
## Formula examples: basic, male as covariate for effects only
ceamodel <- cea_setup(cost | qaly ~ 1, "treat", clintrial_cea)
ceamodel <- cea_setup(cost | qaly ~ 1 | male, "treat", clintrial_cea)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.