markov_model: Definition of Markov model and trace

Description Usage Arguments Value Examples

View source: R/model_functions.R

Description

Definition of Markov model and trace

Usage

1
2
markov_model(this_strat, cycles, initial_state, overhead_costs,
  discount = c(0, 0), parameter_values = NULL)

Arguments

this_strat

strategy object

cycles

no of cycles

initial_state

value of states initially

overhead_costs

any overhead costs for being in each state

discount

rate of discount for costs and qalys

parameter_values

parameter values for assigning health states and probabilities

Value

Markov trace

Examples

1
2
3
4
5
6
7
8
tmat <- rbind(c(1, 2), c(3, 4))
colnames(tmat) <- rownames(tmat) <- c("Healthy", "Dead")
tm <- transition_matrix(2, tmat, c(0.5, 0.5, 0, 1))
a <- health_state("Healthy", 1, 1, 0, FALSE)
b <- health_state("Dead", 1, 0, 0, TRUE)
health_states <- combine_state(a, b)
this.strategy <- strategy(tm, health_states, "intervention")
markov_model(this.strategy, 10, c(1, 0),c(0,0))

sheejamk/MarkovModel documentation built on Jan. 23, 2020, 2:44 a.m.