Learn R Programming

hesim (version 0.4.1)

create_StateVals: Create a 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, ...)

Arguments

object

A model object of the appropriate class.

...

Further arguments (time_reset and method) passed to StateVals$new().

input_data

An object of class expanded_hesim_data. Must be expanded by treatment strategies, patients, and health 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.

Value

A StateVals object.

See Also

StateVals, stateval_tbl