define_state_list: Define Markov Model State List

Description Usage Arguments Details Value Examples

View source: R/states_define.R

Description

Define the states of a Markov model by combining state objects.

Usage

1
2
3
4
5
6
define_state_list(...)

define_state_list_(.dots)

## S3 method for class 'uneval_state_list'
modify(.OBJECT, ...)

Arguments

...

Name-value pairs of expressions defining model states.

.dots

List of states, only used by define_state_list_ to avoid using ....

.OBJECT

An uneval_states object.

Details

State names have to correspond to those specified through define_transition().

All states should have the same value names.

The modify function can modify existing states or add new ones.

Value

An object of class uneval_state_list (a list of state objects).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
s1 <- define_state(cost = 1, util = 1)
s2 <- define_state(cost = 3, util = .4)

states_mod <- define_state_list(
  healthy = s1,
  sick = s2
)

states_mod

s1_bis <- define_state(cost = 0, util = 1)
s3 <- define_state(cost = 10, util = .1)

modify(
  states_mod,
  healthy = s1_bis,
  sicker = s3
)

## End(Not run)
  

pierucci/heemod documentation built on Oct. 10, 2017, 1:07 p.m.