Tools Prototype

Value of information

This tool compares two scenarios, such as a current production system and an intervention, when the inputs are uncertain. It simulates Cumulative Pain and Cumulative Pleasure for both scenarios thousands of times from the ranges you enter. It then estimates which scenario is more likely to involve less time in pain and ranks the uncertain inputs by how much knowing them precisely would improve the decision. In a rapid assessment, this shows which information is most valuable to investigate first.

Prototype for testing. Results depend entirely on the ranges entered. Intervention costs are not included. The example files contain made-up numbers and are not Welfare Footprint estimates. All calculations run in your browser.

How to use it

  1. Download the Excel template. Enter both scenarios on the Data sheet.
  2. Fill in the Data sheet. Add one row per scenario, one per Life-Fate and one per Pain-Track or Pleasure-Track segment, with a minimum and maximum for every uncertain value.
  3. Upload the file (or load an example) and check the parsed input.
  4. Choose the decision metric and whether to compare per animal or per unit of product.
  5. Run the simulation and read the results.

Input data

Download template

Column descriptions are on the Instructions sheet, in the template guide, and in the list below. Upload reads the Data sheet.

Template columns
ColumnUsed inMeaning
record_typeall rowsscenario, life_fate or segment
scenarioall rowsShort scenario name, e.g. Baseline or Intervention. The first scenario in the file is the reference (A); differences are second minus first.
life_fatelife_fate, segmentLife-Fate name, e.g. Market animals or Breeders
harmsegmentName of the negative or positive affective experience (one Pain-Track or Pleasure-Track)
valencesegmentnegative (Pain-Track) or positive (Pleasure-Track)
segmentsegmentSegment number within the track: 1, 2, 3 …
mortality_min / _maxscenarioProportion (0–1) of placed animals that do not produce product. Used directly when every Life-Fate produces product. When a Life-Fate is marked produces_product = no, mortality is instead the drawn share of those fates, and this column is checked against that share.
productivity_min / _maxscenarioProduct per surviving animal: units of product per animal that produces product, not per animal placed. Product per placed animal is (1 − mortality) × productivity.
product_unitscenarioLabel for the unit of product, e.g. kg or egg
lifespan_days_min / _maxscenarioLifespan in days, entered as a range. Use the same value in both columns if it is fixed. Only used by harms with scales_with_lifespan = yes; otherwise informative
share_min / _maxlife_fateProportion (0–1) of the scenario’s animals in this Life-Fate. Leave blank if the scenario has a single Life-Fate. With several Life-Fates, all but the last are drawn from their ranges and the last is the remainder, so the shares sum to 1 and stay inside the entered ranges.
produces_productlife_fateyes or no (blank = yes). No means this Life-Fate produces no product. Mortality is then the share of all such fates.
sharedsegmentyes or no (blank = automatic). Blank and identical harm rows in the two scenarios share one draw. yes requires the rows to match. no draws the two scenarios independently.
prevalence_min / _maxsegment (harm level)Proportion (0–1) of animals in the Life-Fate that experience the harm
occurrences_min / _maxsegment (harm level)Number of times an affected animal experiences it. If scales_with_lifespan = yes, this is the number of occurrences per day of life
scales_with_lifespansegment (harm level)yes or no (blank = no). If yes, occurrences = lifespan_days × the occurrences value
duration_min / _maxsegmentDuration of one occurrence, entered as a range. Use the same value in both columns if it is fixed. Converted to hours.
duration_unitsegmentseconds, minutes, hours or days. Everything is converted to hours
annoying, hurtful, disabling, excruciatingsegment (negative)Fixed probability (0–1) of each pain intensity during the segment. Blank = 0. The four values must sum to 1
satisfaction, joy, euphoria, blisssegment (positive)Fixed probability (0–1) of each pleasure intensity during the segment. Blank = 0. The four values must sum to 1
<any range>_modeoptionalOptional most-likely value for a range (not for intensity probabilities). If present, that range is sampled from a PERT distribution instead of uniform
notesoptionalFree text, ignored by the calculation

Settings

Lower is betterCompareThe random seed fixes the sequence of random draws in the simulation. Using the same seed with the same inputs gives exactly the same results, so an analysis can be reproduced. Change it to check that results are stable across different random draws.

How the calculation works

Formulas used in each simulation draw

Sampling. Each input given as a range is drawn from a uniform distribution between its minimum and maximum. If a _mode column is filled, that input is drawn from a PERT distribution (a Beta distribution on [min, max] with shape parameters 1 + 4(mode − min)/(max − min) and 1 + 4(max − mode)/(max − min)). If min = max the value is fixed. lifespan_days and segment duration are ranges of this kind: enter the same number in both columns when the value is fixed. Prevalence and occurrences are read per harm, from the first segment row of that harm that states them. Later segment rows must repeat the same values or be left blank. A repeated value that differs is rejected. Draws are independent, with two exceptions. A harm that is identical in both scenarios (same Life-Fate and harm name, and the same valence, lifespan scaling, prevalence, occurrences, durations, and intensity probabilities) is drawn once and used in both; the same happens when shared is yes and the rows match. shared = no draws the two scenarios separately. A shared input moves both scenarios together, so it ranks near zero and does not change which scenario is preferred. Only inputs that differ between scenarios can change the ranking. Life-Fate shares with more than one Life-Fate are drawn as described in step 6, so they sum to 1.

1. Intensity probabilities. In each segment, each intensity has one fixed probability. Blank intensity cells count as 0. The probabilities in a segment sum to 1. If they differ from 1 by 0.01 or less, they are scaled to sum to 1 and the page shows a warning. A difference greater than 0.01 is rejected. They do not change from draw to draw.

2. Time at each intensity in a segment. tg,k = dg × pg,k, where dg is the segment duration converted to hours. Duration is the entered range, or one fixed value when min = max.

3. One occurrence of the experience. Th,k = Σg tg,k, summed over the segments of the Pain-Track or Pleasure-Track.

4. Average member of the Life-Fate. Ah,k = Th,k × occurrencesh × prevalenceh. If scales_with_lifespan = yes, occurrencesh = lifespan_days × the occurrences value (read as occurrences per day). Lifespan is a range, in days, and is used only for those harms.

5. Life-Fate. Cf,k = Σh Ah,k, separately for each intensity. Pain (Annoying, Hurtful, Disabling, Excruciating) and pleasure (Satisfaction, Joy, Euphoria, Bliss) are kept in separate totals.

6. Average animal in the scenario. Ck = Σf wf × Cf,k. With one Life-Fate, its share is 1. With several Life-Fates, every fate except the last is drawn from its entered range, and the last fate’s share is the remainder, 1 − Σ of the others. A draw is kept only when that remainder lies inside the last fate’s entered range; otherwise the other shares are drawn again (up to 4,000 tries). Accepted shares sum to 1, and each stays inside the range that was entered, so the marginals respect those ranges. The inputs are interval ranges, so this is not a Dirichlet distribution. If no draw is accepted, the shares are drawn from their ranges and rescaled to sum to 1, which can fall outside a range. The file is rejected earlier when the ranges cannot sum to 1 at all. The last Life-Fate in the file is the remainder.

7. Per unit of product. Productivity is the product per surviving animal: units of product per animal that produces product, not per animal placed. Each Life-Fate has produces_product yes or no (blank means yes). When every Life-Fate produces product, mortality is the entered range, the proportion of placed animals that do not produce product. When one or more Life-Fates do not produce product, mortality on each draw is the share of those fates, and the entered mortality is only checked against that share. Product per placed animal = (1 − mortality) × productivity. Cunitk = Ck / [(1 − mortality) × productivity]. This is the time in pain or pleasure summed over animals placed, divided by total product. Mortality enters only here; it does not change the per-animal values, which already describe the average animal placed.

8. Decision metric. M = Σk∈K Ck (or Cunitk). For pain, K is {Disabling, Excruciating} for time in intense pain, {Hurtful, Disabling, Excruciating} for time in moderate-to-intense pain, or a single pain intensity. The default, time in intense pain, adds Disabling and Excruciating hours with equal weight. That choice affects which scenario ranks higher; the same file can be run on Excruciating alone. For pleasure, K is {Satisfaction, Joy, Euphoria, Bliss} for Cumulative Pleasure, or a single pleasure intensity. Difference Δ = Msecond scenario − Mfirst scenario. For a pain metric the lower M is better, so a negative Δ favors the second scenario. For a pleasure metric the higher M is better, so a positive Δ favors the second scenario. The probability that a scenario is better is the share of draws in which it has the better M (exact ties are split).

9. Value of information. The net benefit of choosing scenario d is NBd = −Md for a pain metric and NBd = +Md for a pleasure metric. With N draws, EVPI = (1/N) Σi maxd NBd,i − maxd (1/N) Σi NBd,i: the expected improvement from choosing with the uncertainty resolved (less pain, or more pleasure). Its Monte Carlo standard error is the standard deviation of (maxd NBd,i − NBchosen,i), divided by √N, treating the scenario with the higher expected net benefit as fixed. For each input θ, EVPPI uses a regression-based single-sample estimator: EVPPI = (1/N) Σi maxd ĝd(θi) − maxd (1/N) Σi NBd,i, where ĝd(θ) estimates E[NBd | θ] by least-squares regression of NBd on a degree-4 polynomial of the rank of θ, from the same draws. This follows the single-sample regression approach of Strong, Oakley and Brennan (2014), who estimate partial EVPI from one probabilistic sensitivity analysis sample. Their estimators are a generalized additive model and a Gaussian process; the polynomial of the rank used here is a simpler regression of that kind, not those two models. Strong M, Oakley JE, Brennan A. Estimating multiparameter partial expected value of perfect information from a probabilistic sensitivity analysis sample: a nonparametric regression approach. Medical Decision Making. 2014;34(3):311–326. An EVPPI at or below the EVPPI of an independent dummy input (the noise floor) is reported as about 0: it is not distinguishable from zero. EVPPI values do not sum to EVPI, and the percentages of EVPI do not add to 100. For a group of inputs (all inputs of one harm, or one Pain-Track or Pleasure-Track), the same regression is done on the group’s contribution after life-fate shares, mortality, and productivity are fixed at their expected values (the midpoint of a uniform range, or (min + 4×mode + max)/6 for a PERT range). The group value then depends only on that group’s inputs. The product group is estimated from the original draws, because mortality and productivity are the inputs being valued. An optional count of animals the decision covers multiplies displayed EVPI and EVPPI into total hours; it does not change the simulation.

10. Sensitivity check. Squared Spearman rank correlation between each input and Δ. Unlike EVPPI, it does not consider whether the input could change which scenario is preferred.

Limitations. Intervention costs are not included. The comparison is time in pain or pleasure, per animal or per unit of product. Intensity probabilities are fixed, exactly two scenarios are compared, and inputs are independent except for shared harms and life-fate shares that are drawn to sum to 1.