Description Usage Arguments Value Examples
Calculate utilities based on time before death
1 2 3 4 5 6 7 8 9 10 11 | utility_by_time_from_death(x, ...)
## S3 method for class 'cycle_counts'
utility_by_time_from_death(x, util_before_death,
util_long_before_death, death_state = "Death", discount_rate = 0, ...)
## S3 method for class 'eval_strategy'
utility_by_time_from_death(x, ...)
## S3 method for class 'run_model'
utility_by_time_from_death(x, m, ...)
|
x |
an object of of type |
... |
other arguments to be passed through |
util_before_death |
a matrix with two columns, |
util_long_before_death |
utility more than
|
death_state |
the name of the state representing death. |
discount_rate |
discount rate to be applied to utilities. |
m |
name or number of a model, only if |
a vector of utilities, of length nrow(counts)
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ProgFree <- round(1000 * exp(-0.4 * 0:24))
Progressive <- round((1000 - ProgFree) * exp(-0.4 * 0:24))
Death <- 1000 - ProgFree - Progressive
state_names <- rep(c("ProgFree", "Progressive", "Death"), each = 25)
counts <- data.frame(.strategy = rep("s1", 25),
markov_cycle = 0:24,
state_names = state_names,
count = c(ProgFree, Progressive, Death)
)
class(counts) <- c("cycle_counts", class(counts))
aa1 <- data.frame(until_lag = c(1,2,3), util = c(0.1, 0.3, 0.5))
utility_by_time_from_death(counts, util_before_death = aa1,
util_long_before_death = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.