From 51c1fbda9c24173152230256ce62f621c51180d5 Mon Sep 17 00:00:00 2001 From: Fernando Alarid-Escudero Date: Thu, 12 Nov 2026 14:37:37 -0800 Subject: [PATCH] Fix the random seed in the psa_generation vignette The vignette drew its PSA sample without a seed, so every build used new random draws. About 1 build in 300 drew p_S1H + p_S1S2 > 1 (for example seed 297: 0.899 + 0.102), the example model then stopped with 'This is not a valid transition matrix', and R CMD check failed (seen on Windows CI for #229). Setting the seed makes the vignette build and its results reproducible. --- vignettes/psa_generation.Rmd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vignettes/psa_generation.Rmd b/vignettes/psa_generation.Rmd index 5b4e56e..a870dcb 100644 --- a/vignettes/psa_generation.Rmd +++ b/vignettes/psa_generation.Rmd @@ -311,6 +311,8 @@ my_dists_params <- list(#Transition Probabilities c(0.5, 0.03, NA, 1), c(0.95, 0.02, NA, 1)) +# fix the random number seed so the PSA sample (and every result below) is reproducible +set.seed(20261112) my_psa_params <- gen_psa_samp(params = my_params, dists = my_dists, parameterization_types = my_parameterization_types,