When running PSA, it is a common issue to have model probabilities that change with time (where the probabilities are usually pulled from a table). Tables only hold numeric values, so they cannot vary appropriately for PSA. This article provides a technique to sample those time-dependent probabilities.
- There is a model attached to this article that is used to demonstrate this technique.
- The model uses a table to define time-dependent probabilities using numeric values.
- There are 10 distributions in the model. Each is a beta distribution. The mean and standard deviations for the distributions are pulled from the table value columns 1 and 2, respectively. The appropriate table row is selected by cycle. The mean and standard deviations are translated into the alpha and beta distribution parameters.
Variable Definition Array
- The variable pDeath is defined using a variable definition array, which can be referenced using a positive integer for an index. The variable definition array contains references to the appropriate distributions for each cycle.
Probability Expression for Death
- The probability of death for each cycle references uses the expression pDeath[_stage+1]. This changes the index value for the variable definition reference, thus pulling a different distribution.
- At each cycle the appropriate distribution is used.
- Those distributions can then be sampled for PSA.
- When the model runs, the _stage keyword automatically increments from 0, 1, 2, etc. until the final cycle at _stage = 9.
- As _stage increases, the probability expression pDeath[_stage+1] uses the first, second, etc. definition from the variable definition array. Each variable definition within the array references the appropriate distribution for that cycle
- When you run Markov Cohort Analysis, the distributions are not sampled, so the mean value is returned from the distribution. The mean value for the distribution is simply the first value column from the table (0.001, 0.002, etc.).
- When you run PSA, the same distributions are used, but they are sampled, generating values similar to the means, but with uncertainty represented via the sampling.
- You can store the individual time-based values in a table, but still use those values for PSA (sampling).