summaryrefslogtreecommitdiffstats
path: root/R Scripts/structural.R
diff options
context:
space:
mode:
authorBen Green <ben@SEASITs-MacBook-Pro.local>2015-06-25 23:56:26 -0400
committerBen Green <ben@SEASITs-MacBook-Pro.local>2015-06-25 23:56:26 -0400
commit7167a81cfb8b872dd1547e5a8669004b191417db (patch)
treedd160b9a7f438837118d8ca9fe83ae6c35a0d71a /R Scripts/structural.R
parentc8fc620dda6096932707566dc8f20a3e65cb26b0 (diff)
downloadcriminal_cascades-7167a81cfb8b872dd1547e5a8669004b191417db.tar.gz
Worked on process to generate cascades in R, recover them in ml2, and
compare true/recovered. Results look good: ml2 finds close-to-actual parameters and gets ~60% of the infectors right. I will check how many recovery gets in the top 2 or 3 infectors.
Diffstat (limited to 'R Scripts/structural.R')
-rwxr-xr-xR Scripts/structural.R4
1 files changed, 2 insertions, 2 deletions
diff --git a/R Scripts/structural.R b/R Scripts/structural.R
index 132aa6c..b68711c 100755
--- a/R Scripts/structural.R
+++ b/R Scripts/structural.R
@@ -1,5 +1,5 @@
-# structural = function(w1,w2,w3,gamma){
-# return (plogis(w1,scale=gamma) * plogis(w2,scale=gamma) * plogis(w3,scale=gamma))
+# structural = function(delta,lmbda,w1,w2,w3){
+# return (delta/(1. + 1./(w1*lmbda) + 1./(w2*lmbda) + 1./(w3*lmbda)))
# }
structural = function(delta,dist){