Skip to content

Commit

Permalink
Add hazard snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
vrognas committed Sep 10, 2024
1 parent f709359 commit 742ecd0
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,49 @@
],
"description": "Logit transform model for adding iiv to parameters constrained between 0 and 1"
},
"Hazard Exponential": {
"prefix": ["hazard_exponential"],
"body": [
"DADT($1) = SCALE",
"SUR = EXP(-A($2))"
],
"description": "Exponential hazard function\n"
},
"Hazard Weibull": {
"prefix": ["hazard_weibull"],
"body": [
"DEL = 1E-12",
"TIM = T + DEL",
"DADT($1) = SCALE * SHAPE * (SCALE * TIM)**(SHAPE - 1)",
"SUR = EXP(-A($2))"
],
"description": "Weibull hazard function\n"
},
"Hazard Gompertz": {
"prefix": ["hazard_gompertz"],
"body": [
"DEL = 1E-12",
"TIM = T + DEL",
"DADT($1) = SCALE * EXP(SHAPE * TIM)",
"SUR = EXP(-A($2))"
],
"description": "Gompertz hazard function\n"
},
"Hazard Log-normal": {
"prefix": ["hazard_lognormal"],
"body": [
"MU = THETA($1) ; Mean of log-norm dist",
"SIGM = THETA($2) ; SD of log-norm dist.",
"DEL = 1E-12",
"TIM = T + DEL",
"LNT = LOG(TIM)",
"X1 = (LNT - MU) / SIGM",
"PDF = EXP(-0.5 * (X1**2)) / SQRT(2 * PI)",
"DADT($3)=1 / (TIM * SIGM) * PDF / (1 - PHI(X1))",
"SUR = EXP(-A($4))"
],
"description": "Log-normal hazard function\n"
},
"BQL M3": {
"prefix": ["M3_BQL"],
"body": [
Expand Down

0 comments on commit 742ecd0

Please sign in to comment.