Learn R Programming

hesim (version 0.2.3)

create_StateVals: Create StateVals object

Description

create_StateVals is a generic function for creating an object of class StateVals from a fitted statistical model or a stateval_tbl object.

Usage

create_StateVals(object, ...)

# S3 method for lm create_StateVals( object, input_data = NULL, n = 1000, point_estimate = FALSE, ... )

# S3 method for stateval_tbl create_StateVals(object, n = 1000, time_reset = FALSE, ...)

Arguments

object

A model object of the appropriate class.

...

Further arguments passed to or from other methods. Currently unused.

input_data

An object of class "expanded_hesim_data" returned by expand.hesim_data. Must be expanded by the data tables "strategies", "patients", and "states".

n

Number of random observations of the parameters to draw when parameters are fit using a statistical model.

point_estimate

If TRUE, then the point estimates are returned and and no samples are drawn.

time_reset

If TRUE, then time intervals reset each time a patient enters a new health state. See input_mats.

Value

Returns an R6Class object of class StateVals.

See Also

StateVals