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 two techniques to sample those time-dependent probabilities.

**1. Sample Independent Distribution for Each Probability**

**Model File**

- Model PSA for time-dependent prob.trex demonstrates the first technique.

**Table**

- The model uses a table to define time-dependent probabilities using numeric values.

**Distributions**

- 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.

**Model Calculation**

- 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.01, 0.02, 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.

**2. Sample a Single Distribution to Adjust Each Probability**

**Model File**

- Model PSA for time-dependent prob-1dist.trex demonstrates the first technique.

**Table**

- The model uses a table to define time-dependent probabilities using numeric values.
- The table includes three value columns
- 1 - Low values
- 2 - Mean values
- 3 - High values

**Distribution**

- There is a single PERT distribution in the model with min 1, mean 2 and max 3.
- This distribution is used to adjust the probability used for each cycle upward or downward toward the low or high values in the table.

**Variable pDeath - Table Lookup**

- The variable pDeath pulls the probability from the table.
- For base case results, the middle (2) mean probability is used for each cycle.
- When PSA runs, the PERT distribution generates an adjustment value. If that sample is less than 2, then all probabilities will adjust downward from the mean toward the low value. If that sample is greater than 2, then all probabilities will adjust uwward from the mean toward the high value.

**Model Calculation**

- 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 pulls the probability from a different row in the table.
- When you run Markov Cohort Analysis, the distribution is not sampled, so the mean value is returned for each cycle. The mean value for the distribution is simply the second value column from the table (0.01, 0.02, etc.).
- When you run PSA, the adjustment distribution is applied consistently to adjust all the probabilities down or up appropriately.

**Summary**

- You can store the individual time-based values in a table, but still use those values for PSA (sampling).

## Comments

Article is closed for comments.