A generic function for creating a PsmCurves object.

create_PsmCurves(object, ...)

# S3 method for flexsurvreg_list
create_PsmCurves(
object,
input_data,
n = 1000,
uncertainty = c("normal", "bootstrap", "none"),
est_data = NULL,
...
)

# S3 method for params_surv_list
create_PsmCurves(object, input_data, ...)

## Arguments

object An object of the appropriate class containing either fitted survival models or parameters of survival models. Further arguments passed to or from other methods. Passed to create_params.partsurvfit() when object is of class flexsurvreg_list. An object of class expanded_hesim_data returned by expand.hesim_data(). Must be expanded by the data tables "strategies" and "patients". Number of random observations to draw. Not used if uncertainty = "none". Method determining how parameter uncertainty should be handled. If "normal", then parameters are randomly drawn from their multivariate normal distribution. If "bootstrap", then parameters are bootstrapped using bootstrap. If "none", then only point estimates are returned. A data.table or data.frame of estimation data used to fit survival models during bootstrap replications.

## Value

Returns an R6Class object of class PsmCurves.

## Details

Disease models may either be created from a fitted statistical model or from a parameter object. In the case of the former, input_data is a data frame like object that is used to look for variables from the statistical model that are required for simulation. In this sense, input_data is very similar to the newdata argument in most predict() methods (e.g., see predict.lm()). In other words, variables used in the formula of the statistical model must also be in input_data.

In the case of the latter, the columns of input_data must be named in a manner that is consistent with the parameter object. In the typical case (e.g., with params_surv or params_mlogit), the parameter object contains coefficients from a regression model, usually stored as matrix where rows index parameter samples (i.e., for a probabilistic sensitivity analysis) and columns index model terms. In such instances, there must be one column from input_data with the same name as each model term in the coefficient matrix; that is, the columns in input_data are matched with the columns of the coefficient matrices by name. If there are model terms in the coefficient matrices that are not contained in input_data, then an error will be thrown.

See PsmCurves and Psm for examples. PsmCurves provides an example in which a model is parameterized both with (via create_PsmCurves.flexsurvreg_list()) and without (via create_PsmCurves.params_surv_list()) access to patient-level data. The Psm example shows how state probabilities, costs, and utilities can be computed from predicted survival curves.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.4745442271232605, "perplexity": 2085.6548680351366}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-05/segments/1642320305242.48/warc/CC-MAIN-20220127072916-20220127102916-00657.warc.gz"}