From 60caa40d8d0b7a7ae5165780088f2acec9fd3fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Rogn=C3=A5s?= Date: Fri, 6 Sep 2024 08:02:21 +0200 Subject: [PATCH] Add binary simulation snippet --- snippets/snippets.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/snippets/snippets.json b/snippets/snippets.json index 9a5cb3f..d63275b 100644 --- a/snippets/snippets.json +++ b/snippets/snippets.json @@ -399,6 +399,21 @@ ], "description": "Concentration derivative" }, + "Binary simulation": { + "prefix": ["simulation_binary"], + "body": [ + "\n", + "PROB = THETA($1) ; Probability of DV=1", + "IF (ICALL == 4) THEN", + " CALL RANDOM(2,R)", + " DV = 1", + " IF (R > PROB) DV = 0", + "ENDIF", + "", + "\\$SIMULATION (12345) (678910 UNIFORM)", + "\n$0" + ], + "description": "Simulation from binary models" }, "FOCEI": { "prefix": ["$ESTIMATION"],