From 5ded6b11a35e40aeecafb921fc302f8a5c82bbf5 Mon Sep 17 00:00:00 2001 From: Chris Jewell Date: Wed, 5 May 2021 11:15:59 +0100 Subject: [PATCH] Added spatial effect to R calculation --- covid19uk/model_spec.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/covid19uk/model_spec.py b/covid19uk/model_spec.py index fc6e61c..da415f6 100644 --- a/covid19uk/model_spec.py +++ b/covid19uk/model_spec.py @@ -343,7 +343,11 @@ def fn(t, state): ), ) - eta = alpha_t_ + param["beta_area"] * log_area[:, tf.newaxis] + eta = ( + alpha_t_ + + param["beta_area"] * log_area[:, tf.newaxis] + + param["sigma_space"] * param["spatial_effect"] + ) infec_rate = ( tf.math.exp(eta) * (