stuwrighthealthecon / MANC-RISK-SCREEN

This repository contains the files required to run a discrete event simulation based economic evaluation of a number of different screening strategies to detect breast cancer in women in the UK
3 stars 1 forks source link

PSA with wide intervals crashing "N/A in probability vector" or "missing value where TRUE/FALSE needed" #50

Open stuwrighthealthecon opened 10 months ago

stuwrighthealthecon commented 10 months ago

Problem When generating data using the PSA and intervals options to set up for a GAM, the i loop crashes and reports one of two errors "N/A in probability vector" or "missing value where TRUE/FALSE needed".

Probable cause This appears to happen at different times in the loop when different data sets generated. It seems likely that a rare combination of monte carlo values drawn in the risksample function creates a computational error somewhere in the code resulting in an N/A value or a value in the incorrect format. Alternatively, it could be due to an issues with new risk_sample datasets overwriting old ones imperfectly when switching from deterministic to probabilistic analysis.

Impact Significant annoyance when the model crashes after a long time

Short term approach Before running PSA simulations, delete the contents of the Risksample and PSA results folders. Try generating a new risksample dataset and run the most complicated strategy you are evaluating first (if the model works for this, it should work for the other strategies).

Long term approach Look further into issues with overwriting existing risksamples as I suspect but don't know definitely that this is an issue. Draw a big risksample then look at the parameter values for missing/irrational values.