Skip to main content
Loading Explore guides…
Bayesian Modeling of Epidemics · Acedra
Home
Explore
Mathematics
Bayesian Modeling of Epidemics
Sign in to save
Chat
If YouTube asks you to sign in, open the video on YouTube.
Watch on YouTube
Reload player
Transcript
163 segments
Copy
Hide video
0:30
I help to organize this webinar series. This webinar series from that is organized by the Committee on International Relations in the Statistics and Statistics Without Border and today it's my pleasure to introduce to you Professor Rob Diedon who is the professor of biostatistics with a drunk position in the faculty of veterinary medicine and the department of mathematics and statistics at the inverse of Calgary in Canada and much of
0:40
his recent work has been in the area of infections. This is modeling, but he's also the interested in basin and completion is this experimental design. This is several surveillance methods, spatial temporal logging and statistical learning. He has published over 75 papers in peer-reviewed journals has started as a associated editor in a number of journals, for example, they turn off the riots, the fiscal, see the Royal Statistical Society series C and the Canadian Journal of Statistics.
1:12
He is going to talk to us today about an introduction to base and modeling of epidemics from population to individual level models. Rob, please, the floor, it's yours. But before, let me remind our participants that if you do have questions, please place them in the Q&A. And I will, read the questions for Rob. It's much easier for us if you do this in the Ko, in a then in the in the chat. Okay, so please drop the floor is yours.
1:50
Hey, thanks very much. Alex for the introduction and the invitation. It's a I know not to be, joining a very impressive set of speakers that you've, had on, this webinar series. So yeah, I'm going to talk today about epidemic models, which obviously been in the news a little bit over the last few years.
2:22
As I put this together, I found I was talking less about the Bayesian aspect. Then the actual model so much so forgive me if you come here to get an overview of Bayesian statistics but I'm gonna spend most of my time talking about the models and I'm going to try and give you sort of one overview of what we're trying to do with these models. But, with an emphasis on simple models, what are known as population level models and time permitting.
2:40
We'll also talk about more complex models. Individual level models. Okay and as Alex says please feel free to put your questions in as we go along. So I'll break the, talk into 3 parts, little introduction. The most of the time probably on the population level models and then a bit on the individual level models. Okay, so there you is COVID-19. This is the stock image at least from the beginning of the.
3:09
Of the pandemic. And obviously this is something that's been very pressing in my field over the last few years. But we've been interested in infectious, all communicable diseases for a long time. There are lots of human diseases that we're interested in, some of them very serious like Ebola or SARS or HIV, some of them less serious, but still, you know, with some mortality attached things like measles and influenza.
3:40
And there's also a lot of interest in disease in the, in the livestock industries. And horticultural industries. Mainly not to do with public health, but more to do with what economics for start, but also animal welfare. And then also the models I'm going to talk about today. Have a lot of similarities to models that are used in ecology as well. So if you're thinking about invasive species, animals or plants, the way they spread. Through spatially through time.
4:26
That looks a lot like the way that diseases might spread spatially through time. And these models or extensions of these models we've also used to model things like fire. Spread another thing that's obviously big in the news at the moment. And, although I haven't really worked in this area, you can use these models for things like, you know, Computer viruses, social means, financial market contagion. As you went, I think about a year ago now I went to a talk. On Ponzi schemes.
4:53
As part of the conference. I didn't seek this out. I was quite surprised to see that they use essentially SIr models. To model, So they're, there are although I'm gonna talk about diseases today. Hey, there are extensions outside as well. Okay, so the topic of today's talk He's really gonna be what we might call mechanistic models of disease transmission.
5:22
And I'm gonna separate these from the idea of statistical models. Statistical models in my mind are essentially models that you take off the shelf and apply. So lots of different systems, right? And they're usually mathematically derived, right? A linear model, your GLM. And from the statisticians point of view. How we feed that through to do things like significance tests or goodness, tests, right?
5:47
But the derivation is really mathematical when if you go down to first principles. That's not the case here. The models here are built. With the biological or ecological mechanisms going on in mind, right? They weren't, they're quite old now. People have been using these models for over a hundred years. They don't, I think I'm right in saying that they weren't designed with the idea of data analysis in mind.
6:16
But obviously as a statistician I'm very interested in how we parameterize these models, inform them via data. One of the things that's special about these models is that the parameters. Generally are very easily interpretable in a biological, way, right? You have a parameter that represents your infectious period. How long you infectious for? You have a parameter that might represent your contact rate.
6:52
Or the, the rate at which disease transmits through the population as opposed to, you know, linear model where beta one is what happens if you increase x one by one unit after accounting for all. X 2 x 3 x 4 which are really mathematical interpretations in my mind and the mapped onto the system. That's how I see anyway. This has a big advantage. If you're especially at the beginning of say, an epidemic or a pandemic.
7:22
Because the fact that these parameters are so easily interpretable means that they can generally be estimated in a piecemeal fashion. And that was certainly done at beginning of COVID. Yeah, mathematical biologists would go to the literature. To look at estimates of the infectious period, right? And they go somewhere else to find estimates of the transmission, right?
7:52
And you can estimate some of these parameters with experiments, that sort of thing as well. And then finally, The other thing I want to to flag up before we dive into the models is the use of these models. Is generally predominantly about simulation. We want to make a prediction, a projection, right?
8:14
We may want to forecast what's about to happen. Or we may want to simulate and then impose some sort of control strategy to see what happens if we vaccinate 30% of the population or 50% of the population. Right. Whereas, the things like risk factor assessment, you know, is my covariant significant that tends to take a secondary position in this field. It's not always, but generally. Now there are before I carry on just to point out. Well, I'm not gonna talk about today.
8:50
And that's all the other sort of. What we call disease surveillance methods for analyzing infectious disease data. And what it mean by that generally is taking as I say off the shelf, statistical methods that may have been designed for other. Situations and applying them to disease data. Right, so that might mean things like control type methods. Where you know, you're observing the number of cases of a disease that's going on every day and suddenly it takes off.
9:29
And you wanna identify when that change point is, right, which in terms of. Disease, epidemiology means when does an outbreak occur or when does, The influenza season start, right? Things like that. And then there are things like spatial, spatial temple disease mapping, which is essentially count regression accounting for spatial structure or other sorts of. Regression, longitude, no, that's all important stuff, but it's not what I'm talking about today.
9:59
Okay, so these mechanistic models. Transmission models I'm talking about. You can, they're, whole suite of them. Rudely, I think you can divide them into sort of 4 different. Parts, right? And different people would do this in different ways, probably. But so my first, One here, I'm gonna talk about a lot today. Are these population level models? Sometimes they might be referred to as homogeneous models. And there's an underlying assumption in there.
10:35
That is essentially everybody is the same, you know, there's no gender effects or age effects or geographical effects about your risk of getting or passing on the disease. Everyone's the same and everybody comes into contact with everybody else. Purely randomly. Probably a very low rate. It's purely random, right? Hence the homogeneous model. And we will spend.
11:00
These are very simplistic models in a way, but they're also extremely useful. And we'll spend that as I say, fair amount of time talking about those today. Then if you like, you can ratchet up the complexity. By putting in a bit of structure, right? So say you, your population into different sub populations or strata. So these may be different age categories or gender or.
11:25
Geographic regions. And essentially there you you assume that predominantly within the strata. One of these homogeneous models is driving. The infection, but you also allow for. Transmission between strata, which occurs at a different, normally much lower rate. Right, so you're adding a bit of structure to If you take that a bit further, you get to the other.
11:50
Topic that I'm gonna try and address today, which is what I call individual level model, sometimes individual based models is what they're known of. Oh nice. And in these models it's more complex. If the chances of any particular infectious individual infecting any other particular susceptible individual are going to depend about upon covariance about the individuals concerned. So they may be things like, they may be things like gender, they may be things like, your spatial proximity.
12:24
To, an infectious individual. Okay. And then there's a fourth category, which I don't really work on very much. Which are which are also extremely popular. Which I think of as being very high dimensional, highly complex versions of these models. And ILM might have 5, 10 parameters in it. Hey, agent based models may have 50, a thousand parameters in. So you're really getting in deep and trying to mimic the behavior of your population and how the disease spreads within that. Right?
13:06
So you might be modeling. Commuting patterns in a human disease or things like that. These are obviously potentially more realistic, but they're also much harder to parameterize because you've got a lot of parameters. And if you get some of those important parameters wrong. They can actually end up being quite unrealistic, right? But that the 4 general types and like I say, the population level and the individual level already what I'm gonna try and talk about today.
13:34
Couple of things also about the sort of what makes these models different to Dammal statistical models we might use. So the statistical language, it really comes down to this idea of non-independence of infection events, right? So if you think about. With these modules, what we're often doing either directly or indirectly. Is modeling the time at which something happens. We're modeling the time of infection, the time of removal.
14:13
Which sounds similar to Survivor. Except in survival analysis, you have an independence assumption. If you're modeling cancer, lung cancer, After you've accounted for covariates, you know, age lifestyle. My risk of getting lung cancer at any particular time doesn't depend on who else in the population has lung cancer. There's an independence there. That's not true with infectious diseases, right? If I.
14:36
I mean a room with people who have influenza. My risk of getting influenza is much higher than if I'm in the same room and nobody has influenza in that. Room right so the response if you like affects the response of other individuals. So another way of thinking about that, you have some sort of feedback. Where infection drives infection. Okay. And that's one of the reasons we don't tend to use off the shelf statistical models, we use these more mechanistic models.
15:17
Okay. And then one final point. I am gonna show you a model in a minute. One final point is that a lot of the modeling that's done in infectious disease work is done in continuous time and I do that. Here I'm gonna use discrete time models. Okay, so my T is gonna be. an integer. So we sort of, if you like. Building our model to follow the data in some sense. It comes in daily or weekly. The actual process is obviously continuous, right? There's a time of day at which you get infected.
15:47
But we're gonna be ignoring that in these models. But all of the what I'm going to talk about today can be done with continuous time as well. Okay, so I wonder. I've actually hidden my Kind of, but I wonder if there are any questions. I can't see anything there. Oh, okay. So I will. No questions, Rob. You may go ahead. Move on just kinda There we go. Alright, so let's look at the population level. So I'm gonna talk about.
16:26
A model that you've probably heard of, which is the It is essentially the simplest non well not it's not quite true. It's going to say the simplest non-trivial. It's one of the simpler. Non check for your models. And it's probably the most commonly used model I would say. Right. And the basic idea with an SIR model is you have a population. And you assume that individuals in that population are in one of 3 states. Or quite often we refer to them as compartments, right?
16:59
And those 3 states are susceptible, infectious or removed. So you start off in the, susceptible state. Which means you can get the disease, you haven't got it yet. And then there's some transmission rate that determines your risk of moving into the infectious period. Sorry, the infectious state. Usually the way we do that is we say we've got some Transmission rate parameter beta. Or infectivity rate it's sometimes called. In our case, we're gonna want to estimate.
17:37
Then we multiply that by the number Here the number of infectious individuals. So the more infectious individuals there are at time t. The higher that rate is and often we standardize this by dividing through by the population size and we don't have to do that, but we often do. Just in this case, it's just a scaling factor, essentially. Now if we're unfortunate enough to be infected.
18:06
Under this model we immediately become infectious. So we can start passing on the disease. As soon as we're infected. And then at some point we enter this removed state bar right and that occurs according to some removal rates, this gamma down here. Which also determines the, Infectious period so often we think of that in terms of one over gamma. Which actually gives you the the average infectious period. Okay. And just to make clear before I move on.
18:47
Notationally, I'm gonna use S. T to represent the number of individuals in each of those compartments, susceptible, infectious, removed. You can set this up so the Si and other proportions, right? So here. Yes, at any given point in time, S plus I plus R is gonna be called N, the population size. I'm assuming there's no birth, no deaths, no migration. Right. But you could set it up so that this equals one and you track the proportions over time.
19:20
And then one last thing that I want to say. So this, R is often referred to as the recovered state. More generally it's a removed state. What it means is you essentially Disconnected to the population in some sense. Right? You can't infect anybody, you can't be infected. So it can mean you've recovered and you've acquired immunity, but it might mean you've died. It might mean you've got into quarantine, right? So more generally, refer to this as a removed state rather than a only covered state.
20:00
Okay. Now think about how individuals gonna pass through that. Those states, it's very simple. I can write this down in terms of a set of difference equations. So the number of susceptible at time t plus one. Is going to be the number of susceptible. Current time point minus. Is IT star, which is gonna be the number of new infections at time t. Alright, so I, IT star and RT star. Represent those new infections, new removals.
20:36
Similarly, in terms of, I. The number infectious at time t plus one will that will equal the number currently infectious. Plus the new infections. Minus the new removals. Okay. And then they will pass into the removal state. So that RT plus one will equal our T. Plus RT star. Okay. Now I wanna set up some sort of stochastic mechanism that people get through this. I wish I should say that.
21:06
So a lot of the time. When people model this they use ordinary differential equations in continuous time so all of that is deterministic. Away being statisticians, you can have a stochastic model that can capture some of the the uncertainty that we certainly see in disease data. So all the stochasticity essentially happens on this slide. If I think about the. The number of new infections. Well, they're at a given time point, the maximum number of new infections I can have.
21:43
Is going to be the number of susceptible at time t. And then that's gonna happen according to some probability. Which I'm gonna call here Pi TSI. And that's defined down. Yeah, right. So that's basically if I, there's an underlying assumption of a press on contact process and homogeneous mixing. And what you end up with is an infection probability that looks like this. It's one minus e to the minus. And then that transmissibility. Or infectivity that I had on the previous slide, right?
22:22
So beta. The infection rate times the number of infectious individuals divided through by. The population size where actually that's optional. Okay, and then similarly. The number of new removals well that's gonna be binomial as well the maximum number I can have is the current is the number currently infectious. Right. Theoretically, all of them could enter the removal. State in one at one time point.
22:49
And then we have a probability. Determining that, which is just gonna be one minus e to the minus gamma. So. Obviously your infectious period doesn't. Depend on who else is infectious or how many other individuals are infectious. But your risk of getting infection, becoming infectious does. Rob, I have a question. I mean, because I think it's an important question. Can you explain more? This is to cast it compartments. So I'm guessing I answered that on this slide. Was there something more?
23:23
Lines. So, Houdini, please. You can type again if you. If you have for the doubt about about the interpretation of this compartments. Okay, but I will say that it has been answered. Okay, go ahead. Okay. Alright. And then if you simulate from a model like that. The number of susceptible. Infectious, removed, changes over time. The number of susceptible will go down. The number of removed will go up.
24:05
Generally the number of infectious goes up. And then down again, right? And if you want to go through this matrix and check that it fits those, difference equations. We can, you can do that afterwards, but you know, it's a fairly simple calculation. In fact, you can do this in Excel if you want and run these things and people do do that. Not me. Okay, so graphically what does this look like? So here I've got a population size of 10,000.
24:36
I've set my transmission rate to be point 8. My removal rate be point 2. So my infectious period here will be one over point 2, which is 5. Okay and it's generally this red curve that we're interested in, the number infectious or sometimes we look at the number of new infections, right? If that tends to go up. And then as. My number of susceptible goes down. You reach an inflection point, right? There are no there are fewer susceptible to be infected. So this curve heads back down and tell.
25:08
Pretty much everybody's been infected, right? This is stochastic. So the epidemic can die out early. So not necessary. It's not necessary that everybody gets infected. And actually you can see. That the number of infections which goes to 0 is lower. Than the number of susceptible. So there are still some susceptible. at the end of this simulation here. Okay. And, similarly the Good, similarly, it's the inverse, right? But there are a number of removals goes up.
25:42
Over time and tends to go to end. Depending on when the epidemic dies out. Okay, but there is the So he's a graph of. 20 epidemics. So you can see I've actually changed the infectious period here of halved it. So this is peaking much lower previously it was peaking around just over 4,000. 4,500.
26:21
These peak generally around 400. Okay, but there's a fair amount of variability there. And you can actually see there's at least one curve down here where the epidemic died out through random chance at the beginning and never got going. Okay, so there's a probability of. Not quite. But low numbers of infections as well. Alright, since. I can see that there's no questions there. I'm just gonna talk briefly about inference for this model.
26:54
So the likelihood for this model is actually very simple. In fact, let's go back to this stochastic slide because everything really interesting going on. Is occurring here. Right. I've got a bunch of new infections at each time point. So time series of new infections. I've got a bunch of Remove new removals at each time point. So time series of those. And they follow, So I can just write down the binomial mass functions.
27:29
And this is actually where we come. How did that happen? This is the log likelihood so it's all on the log scale. But if you look at that, you'll see that's just by now. Mass functions on the log scale. So if you know the number of infections at each time point or new infections. And you know the number of new removals at each time point. You plug that in to this likelihood. And you can maximize that quite easily to do maximum likelihood influence. Okay.
28:02
Using the optimum command in our or however you like. And in fact, there are packages around our packages around to do that as well. Okay, so they actually I will answer this question as well just before we go on. So the deterministic model. Hey. Or the deterministic equivalent of this model. Would be a series of ordinary differential equations. Okay, which will look very similar. You've got the susceptibles being depleted by Right. That, give, give, in here.
28:46
But you do this in ordinary differential equation. So the deterministic model. When you run that you get the same output each time and when I say deterministic it's generally a continuous time. Version of that model as well. Cause it's an ordinary differential equations. That's the sort of standard and the model that most people mean when they refer to as an losing and actually the deterministic model is great if you're just interested in the mean behavior.
29:22
As you saw from this. I think the stochasticity that you get with these models. Is much more realistic of what we see in real life, right? Epidemics can die out. I mean, and, you know, just through random, random is a dangerous word, right? But unobserved, all random things going on in the population. You can get quite different outcomes. So I think most people agree that adding some stochasticity to these models.
29:52
Is a plus and certainly from a statistical point of view if you want to capture uncertainty you have to do that right. Okay, the vaccination. Question, I will come back to you later because that fits in better with the extensions. Done. Please Alex remind me if I forget to address that. Okay. Okay, so like I said, we can do maximum likelihood inference. We tend not to. Right. We tend in this field to use. Bayesian models or work in the Bayesian framework. There are a number of reasons for this.
30:38
The first one there. Influence based on the posterior. Is highly interpretable. Is perhaps not the most important one from, from a. A disease model is point of view. That is very nice, right? The fact that your posterior is probability distribution and you don't have to think about repeated sampling. What does repeated sampling mean anyway with an epidemic which only occurs once, right? Is very nice.
31:02
Right. But it's actually the second and third points here that I think. A more important from a practical. Point of view. Right. So one of the things is that I've said If you've observed your number of new infections and a number of new removals at each time point. We can do maximum like good inference here very simply. Well, that actually is quite a big assumption. And generally our epidemic data are incomplete in some way.
31:38
Often due to censoring, right? I do not normally observe when someone gets infected. I might observe when there's a lab diagnosis or when symptoms occur. But that happens after infection and I may well not know how long after, right? And it can vary a lot between people. And COVID was very highly variable disease. So because of that we often want to impute the data. Or if you jointly estimate.
32:10
The missing data and the model parameters, which is conceptually straightforward to do in the Bayesian framework because the data and the parameters are both. Random variables or realizations of random variables. Okay, that's called data augmentation. And essentially, as I say, It means jointly estimating the data or the distribution, the posterior distribution of the missing data.
32:39
And the model parameters. Okay. It's harder to do in the maximum. Frame you could do it the name, but maximizing those. Hi, dimensional, likelihoods can be difficult. Okay. And then the third one. And this is tied to the second point here is the Bayesian. Framework obviously builds on prior information. You start with your prior, you update that information with your likelihood. Well in our case we often have prior information because other people have done studies.
33:12
As I said before, the parameters tend to be interpretable on their own. So you may have piecemeal studies. It's often quite easy to sit down with an expert and say, Give me an 90 or 95% probability interval. For the infectious period or the main infectious period. What do you think is going to be the case? And the truth is if you're doing this where you're essentially trying to model. The data or part of the data as well as the parameters.
33:46
We often rely on prior knowledge to put us in an area of the parameter space. Or if you like, cut off unrealistic. Areas of the parameter space and it, identifiability of the models. Having said all of that, I'm not gonna do this today. We're gonna assume that we've seen The, we know the number infectious at each time point and the number removed. But just to bear in mind that we often do want to be doing that.
34:17
Alright, so in our case, there's our likelihood again. If we're doing it in a Bayesian framework. We put prize on our parameters. Our 2 parameters, beta and gamma are both positive, that rate parameters, right? So typically we'd use a gamma prior, you could use a half normal or uniform. half T, something like that. And also often We will put the prior on the inverse of the gamma. The mean infectious period.
34:56
Partly because it's easier to elicit. Prior information that way, partly because it's just easier to interpret, right? From our own point of view. But you can do it either way. Okay. No. The way we've been doing this recently in my group. Is using what's called nimble So, in our package, well, essentially a language. For fitting statistical models. In the Bayesian framework, using Markov chain, Alright. It has a few advanced, so it's built upon these older languages. So bugs.
35:41
And jags and you can do everything today. Everything I'm talking about today you can do using bugs or jacks. The nimb is built on that, which means there's a lot of material out there. If you're learning nimble you can get code for all different sorts of modeling situations But the key thing here is one of the key things is that Nimble, compiles.
36:13
The, MCMC in C plus plus, which means you end up with pretty fast, MCMC algorithms, which can be a an issue for complex models or a lot of data augmentation. And then the other thing I can't really get in today. Into today is that Nimble also allows us a lot of flexibility. So basically you can go into nimble and change the MCMC proposals samplers that are being used for different parameters to make things more efficient.
36:48
That becomes important when we do. Day to augmentation. Okay. Now I actually, I don't have time really to go through all the Nimble code, but I have a Markdown file. So if I can close. No, how to use my own computer. There we go. If I go to my web page. So my web the link from my web page is. Is at the beginning of the slides and on the final side as well. If you just search for Rob De and you might have trouble finding this web page because it's a new one.
37:20
I had a university account of Calgary one. And then, well, they got rid of the web hosting and so I've got a new GitHub based page. But if you, as you can see, I've got a picture of me there that when I was quite a bit younger. If you go down to the bottom of the, opening page, you'll see that there's a Oh, nimble code, but, for today's talk. The mark down file is there if I click on the PDF That would download and I'll just briefly show you what's in this. So.
37:55
I'm gonna go through this very quickly. We've got a bit of code here which basically defines the model. If you take a look at this, this is setting the initial conditions. And then this has got the removal, probability. The infection probability this one changes over time. This one doesn't. The. New infections, the removal infection, so that's the key part of the model.
38:24
And then also what this is as well, the updating of those things. So this is the difference equations and then my information about the prize. And then we do things using this model. Right? So on the next couple of pages, we do some simulation work. So you can see similar things to what, what I showed you in those slides. And then here. Well, I've got slides on this in the talk, but this is basically the code for simulating a data set.
38:54
Specifying my prior. And then using MCMC. To to fit that model. Now, apologies that that's so quick. I don't really have time to talk about it now. Please, feel free to have a look at that afterwards. And if you have questions, let me know. Oh, I should have said. So. Caitlin Ward, who's now Minnesota, but was a postdoc of Alex and mine. She actually coded most of this up. So really that was all for names should be reversed. I mean, I did make some changes, but Kaitlin did most of the work.
39:30
Learning how to code these things up in Nimble. Okay, so she needs to. Big dose of credit there. Okay. So. There's all the code. In the background, we'll forget about that for now. What I've done here is simulated a data set. So with the, transmission rate of point 6. And the removal rate of point 2, so my infectious period once again is 5 days. And here what I've got is the number of new cases.
40:02
Is called this incidence number of new infections. Should I buy this curve? And the number of new removals. Which is delayed a little bit. And then that data set. Which is essentially 2 times series, right? If I want to analyze that, I need to put a prior on it. Or price on my parameters. Hey, what I've done is I've used. An exponential prior. So a gamma prior with rate and shape equal to one for beta.
40:34
Okay, so if you remember my true value of beta was point 6, so this is a pretty uninformative prior. On that beta parameter on the gamma, I can do this analysis with a non-informative prior on gamma as well, but what I've chosen to do is pick a prior. The essentially has sort of ties to information we might have in real life. So I've picked this prior. So that essentially that's about one over 6. How about? One over 4.
41:17
So about 90%. Of my prior mass. Give me a mean infectious period between 6 days and 4 days. Okay, so that's the sort of information you get. And if you want, there are packages that will elicit these prior, you know, given quantiles like that. So like say this is a reasonably informed prior. But not that informative actually if you change if you simulate data we have 4 day infectious period and a 6 day infectious period. You actually tend to get quite looking. Different looking epidemic.
41:55
Good. I'm supposed to be leaving this to you, Alex. I'll come back to these questions in a minute. Okay, let just let me know why I'm here to help you. Yeah. I know. This, this is my control. Okay. So if I run my MCMC, what do I get at the end? For that data set. Well, I get my MCMC trace plots. For those of you who aren't familiar with MCMC, what I'm essentially looking for is a stationary curves, so, stationary plots.
42:33
Cause what MCMC does is it sets off a Markov chain which when it reaches stationarity is exploring the posterior. So if I throw away some of this curve. It's not really, is it? It's chain, that's the way I'm after, throw away some of this chain. I can treat the rest of the chain as if it's a sample from the posterior. And then that's what I've done down here. I threw away 1,000 samples. From those chains so I get my marginal posterior for beta.
43:02
Remember the true value was point 6 here and I get my marginal posterior for gamma. My true value was point 2. Okay. Alright, I should say that these trace, beautiful trace plots. That's really because we have simulated data. It tends to be a little bit harder to reach stationerity with real data when you've got, you know, problems with. And then I can do things like, you know, just find the posterior mean. So it's point 6.
43:40
To 2 decimal places point 6 one for beta. Point 1 9 1.2 0 for Gamma so very close to the true values and I can get my credible intervals. So here I've just got percentile intervals. The 2.5 and 97 point fifth percentiles of my posterior which are obviously capturing the true values. Okay. Alright. So that's my brief overview on how to fit that sort of model to data.
44:11
As I say, you really will need to dive into the nimble a bit more to understand what I've done, but it is easy to just code up the likelihood and maximize it in our. Okay, so a couple of questions. Can models like these be used to moral situations? Where infection is considered a social influence. Okay. I don't understand that question. Okay. So let me just suggest, John that you clarify the question, please, and then Rob will address it again.
44:47
Yeah, that may be different language in different fields, but I don't quite follow that. And that's for books. Well, I'll come on to that. In a few minutes. Okay. Alright, so one sort of aside, I'll go through quite quickly. I want to about this idea of a basic reproduction number. Or not. This is essentially a a statistic or. A quantity that's used a lot in infectious disease modeling. It's known as, And what it represents is the expected number of infections.
45:33
The result directly. So directly is important. From a single infection. In an otherwise wholly susceptible population. Right, so it's conceptually we're saying here's my population. One individual gets infected somehow. How many individuals on average did they directly infect. Right. And it's a useful metric because neither the transmission rate or the infectious period on their own.
46:05
Really tell you about the strength of the epidemic. A very large transmission rate, but tiny infectious period might not give you a very strong epidemic. Now it turns out if you go through the math. It's very simple to calculate in an SIr model. It's just the transmission rate divided by the removal rate. Which is what the transmission rate. Multiplied by the infectious period, which conceptually sounds completely correct, right?
46:33
Well, it is completely correct. The transmission rate determines how often you are infecting the infectious period determines how long you're infecting for. And it captures if you like this strength of the epidemic. It has this nice threshold behavior in relation to all or equals one. And so it turns out that if, is less than one. The epidemic. I'm sorry, if I know it's greater than one, start there.
47:01
That means on average you're infecting more than one individual. The epidemic tends to take off and infect the entire population. Okay, if it's close to one, it could die out for random chance, but it tends to go through the whole population. Where is he? Where is less than one? The epidemic will tend to die out. And that's one of the reasons it's of interest. We can really need to, oh, well, it's here now, right?
47:31
So here's a couple of examples. So if I had a situation where B 3 was one, gamma, point 2. So, II know, equals 5. I get a curve here that looks like this. I've done this on the proportions scale over here. So that's the proportion of the population susceptible, infected or removed. If I have my transmission rate. But keep the, the removal rate the same. My own all goes down by half as well. 2.5. You can see what happens is I end up with a much slower epidemic.
48:07
And you'll remember from COVID at the beginning. There was a lot of talk of bringing down the our number. So that we had more time. The epidemic was slower we had more time to put in place you know emergency hospitals and and public health measures and that sort of thing. But often what we're trying to do is bring that, right under one, one so that we can. Actually, get rid of our, right, so that it dies out. Okay. Okay, let's
48:49
Oh, okay. So the question about the social influence question. Is I would say yes. But I don't know enough about the field. Like, so people do use these sorts of models because the more, Yeah, the more you see a social media meme or the more people who see a social media name. The more there are to pass that on. So the general numbers of people who see a social media, or do something like the ice packet challenge. Could follow that. That sort of.
49:24
The similar sorts of dynamics. Thanks for clarifying that, John. Okay, how are we doing? I'm going a little bit slow, but I do want to talk about some of these extensions. Okay. I'm gonna go over these quickly because really I've just introduced you to the classic. Disease model. And there are lots of different possibilities. Right. So one of the possibility is to change that compartmental framework or the number and types of states.
50:02
Right. So, the I said before. And then corrected myself that the SIr was the the simplest non-trivial model. Probably the simplest non-trivial model is the Si model. So in the Si model. You essentially allow for infection, but then assume everybody stays infectious. For the rest of the time period. You're observing. Okay. That can be useful. I mean, some diseases people don't recover.
50:26
If you're looking over a fairly short time period and then modeling something with an infectious period that's long. HIV is the obvious thing that springs to mind. An Si model might make more sense than an Okay. The other thing that's very common. Is this SEIR model that I will talk a bit a little bit more. On the next couple of slides. That basically allows for a latent period where after getting the disease your body is reproducing the virus, the bacteria, the pathogen.
51:02
There's a time at which you don't have enough of that pathogen to infect other individuals. So you go through this period exposed period to be referred to it where you're infected but not yet infectious. Okay, that's in a lot of diseases, that's a very important thing to include. And then another sort of class of these things. Models that allow for re-infection. So SISI RSSE IR.
51:42
After your Oh state here does mean Recovery with immunity. But that immunity dies off after some period and so you go back to being susceptible. Alright, so what you'd essentially have is if you remember I had that initial. Slow diagram with my rates. There would be Another right, let's call it lambda, which individuals go back to being susceptible, for example. Okay, and you can build up the model. Quite simply in that way to make these things quite complex.
52:17
Okay, so just to show you how simple that is in terms of an SEI, SEIR model, which is one of the The simplest, models. So I put in this extra compartment there. Individuals would get infected at the same way as before. Alright, so the rates of infection depends on the number infectious. Doesn't depend on the number exposed, obviously, cause they can't infect yet. And then movement from exposure to, oh, exposed to infectious, that just occurs according to some rate. In a similar way that the.
52:55
They. Movement from infectious to remove all cause, right? So you end up with an extra line. In our difference equations and extra probability. An extra binomial. Mass function that we plug into the, right? But if you observe these 3 times series, the number of new exposed, the number of new exposed, the number of new infectious number of new removed. This model perfectly easy to. Okay.
53:30
Another thing that's very common in these models, just briefly touch on, is to make your transmission rate time vary. So all I've done here on this slide, if you look at the previous slide of this transmission rate here depending on beta times I over N. I've just put a T that to emphasize that B 2 T may change over time. Now why might that change over time?
54:01
Well, beta in this model is capturing really 2 things. Is capturing the strength of the pathogen or how in how infectious the pathogen is, how easily does it get into your body. But it's also capturing the contact rate in the population. They both included in that one parameter. You can separate them out. No, we haven't, we haven't done that here. Okay.
54:24
So The contact, that can definitely change over time, right? People can react. To a disease being in the population, governments can bring in restrictions. So that's actually can the strength of the pathogen, right? If a pathogen is evolving that may. Change as well. You can model this changing transmissibility in all sorts of ways, you have a linear trend or something more flexible. A very common thing to do is just allow for change points. Right, so this is a graph of.
54:53
K or new cases of Ebola virus from Sierra Leone in 2014, 2015. So the Follows a very typical shape for an epidemic. You can see these 2 red lines. And I should say like for those of you on where, is a devastating disease. It has a very high mortality rate. And the symptoms are like. Horrible. So there were 2. Red bars here, which basically show changes in, Government policy essentially, right?
55:39
So this, was a UN initiated policy. Which he was introduced to the beginning of October. To essentially make sure that cases were isolated. And safe burials were carried out, right? So that. Infection from new also newly infected individuals were less likely to infect others. It actually took few months before they felt like they'd reached a hundred KA hundred percent case isolation and safe burials.
56:04
So what you could do and what was very common is to model your transmissibility so that at some rate at this point. Changes after the UN mere policy comes in and maybe changes again. After the 100% case isolation is reached. Okay. So writing down that model is very simple. Yeah, we just allow our beta to be. One value before the time period change and I'm into. No, this one here, so that T one star. Cool that T 2 stop. So we have a transmission rate before.
56:41
The, comes in. We have a transmission rate afterwards, but before a hundred percent effectiveness is reached. Or they call it 100% effectiveness. I imagine. Reality it's close to a hundred percent effectiveness. And then a further. Change in that transmission rate represented here by the B 2. After that time period. So that's also a very common thing that's done with these models. Okay so. That's all I wanted to say on the population.
57:20
I was saying, that There's no book that sort of covers what I've talked about so far. In one place, right? But there is a lot of stuff out there. So a nice book relatively new book by, Go the epidemics and model models and data using our gives a really nice overview of this population. Level models. I think they call them time series SIR. I see. Is often used to mean what I call.
58:02
Just quick time, I believe I should have checked this before the talk. I believe that they talk about this mainly in the, maximum likelihood framework rather than daisy in framework, that might not be right. But it's a really nice book. If I skip down here, there's a more advanced one of those Chapman and whole handbook of infectious disease data analysis books. By then have held and others. It covers a very wide range of different modeling. Techniques.
58:28
It doesn't tend to give you the code. It goes more into, you know, the math and how these models are used. And then the other thing here is if you are really interested in Nimble. There can be a little bit of a learning curve with Nimble. The Nimble user language, which you can find or either on cram or on the, is really nice it's got a tutorial and there are actually tutorials on YouTube and all of that sort of thing as well.
59:05
So these are 3 things that I would start with. Okay, if you're new to Bayesian modeling then I do believe there's a talk And one of these talks is up on the, community, the ASA community website. So I would go there and start there. Okay, so I'm very new to compartmental models. How do we approach multiple strains? So that's, a little bit more complicated. So I have done a little bit of work in that area.
59:34
The usual way. Is to build into your model and assumption that If you get one strain, you get full protection from that. And possibly partial protection from the other strain. And then you can do that. Either by changing the transmission rate. Oh. By changing the infectious period is another way of doing it. It's a little bit more complex. Or too complex to go into today, I would say. If you send me an email, I can point you to some references.
1:00:10
David asked, how do you communicate the stochastic in the models? Can we say anything definitive? That the probability of some number of infections being exceeded. Yes, you can. And that's one of the nice things about the Bayesian approach, right? I can get my posterior distribution. I can simulate, draw parameter values from that. Posterior and simulate epidemics and do that over and over again. And then my epidemic. That I simulate or my epidemic curves capture that uncertainty.
1:00:45
I can then do whatever I like. I can look at the probability, the number of epidemics in which. The peak was above some level or. In which the number of infections were Above some level. Okay, so that's actually a really nice thing to do here. And it is key. Probably to. To communicating stochastic. Well, maybe it's the people I deal with, but a lot of public health people better at understanding, to statisticians give them credit for.
1:01:31
Visually or turning it into some. Epitemiologically important metric like the probability of a serious epidemic. I think he's key to doing that, yes. And then. Anonymous had a question in a population where the disease understudies vaccine presentable. Would you still include the vaccinated subpopulation? Rather consider everyone to be susceptible. So it depends. Alright. They are diseases where it's pretty safe to
1:02:16
So you may allow in your model. Those individuals to go straight to being removed. Right? Or you can allow for different levels of infectivity. I see you could have a situation where you have Okay, I one. Oh, I too. Right and those different I compartments might represent vaccinated individuals. Unvaccinated individuals. So we know in COVID, right? The vaccine was not 100% effective, people could still get it.
1:02:50
And they could still pass it on. But probably a lower rate. Right, so this sort of framework would allow for that. Another thing that was often done in COVID, which I haven't mentioned is I have a situation where You have asymptomatic cases. And infectious cases. So these would be individuals who have COVID but don't have any symptoms. And obviously the Bayesian framework is nice for that because you need to compute this number because we don't know.
1:03:24
But if you sit down, you look at your flow diagram, you think about the rates. It's very easy to build these models up into more complex models. Of course, if you do carry on doing that, it gets harder to parameterize them, the more complex the model. The harder is to find information on those parameters but That's a ubiquitous thing in modeling and statistics.
1:03:57
Okay, so I think I got the question. Alright, so I'll try and go through this quickly, but I just briefly talk about a different approach. It's not really a different approach. It's an extension. Of these. Models, but perhaps it starts in a different. Place. Okay. So in our classic OSIR model. I essentially had this. Situation. Right. I was essentially assuming that the infection rate per individual is the same for every individual.
1:04:27
At a given time point. Alright, so my individual infectious, right? If I think about that. Beta IT where I is your individual is just equal to BT. And that's proportional to. Some parameter multiplied by the number of infectious individuals. I say proportional, cause we divide through by end. And we've also got this homogeneous assumption, right? We've got this assumption that people are mixing. Homogeneously, completely at random. And we're assuming they're all the same.
1:05:06
Now we know. Real life is not like that. Okay, you can think of lots of factors that are going to affect your risk of getting the disease or passing on a disease. Geographies and obvious one. I am more likely to contract. A disease from people in my neighborhood. That I am from people who live in a city 3 miles, 3 h drive for me, right? And actually you can think about geography or spatial distance.
1:05:31
Human diseases are often better modeled through contacting or spatial distance, human diseases are often better modeled through contact networks, right? There are a bunch of individuals I come into contact with, people I live with. People I work with. Maybe people who live in my neighborhood. They would all occur at different rates and you can represent that.
1:05:57
Sort of contact through a contact network, a graph where This describes individuals and then you have edges describing whether people come into contact or not. And that can represent all sorts of different types of contact that I'll talk about in a minute. Genetics may affect your susceptibility to a disease. Immunity have you had the disease before? Have you been vaccinated before? Have you had similar diseases, right?
1:06:22
Different strains of the same disease that may all affect it. Things that lifestyle factors, environmental factors. They probably tied to immunity, right? They may affect your immune system or lifestyle factors may also affect how likely you are to pass on the disease as well. If you're, using intravenous drugs, there's a risk factor that you you have for passing on a disease as well as getting a disease that you may not share with people who don't use, drugs.
1:06:54
Okay, so as part of My postdoc that I did. Or feels like 50 odd years ago now. I worked on, modeling frameworks. For these sorts of situations. We call it individual level, other people call it individual based. You can get more details about that framework in this, the,ica paper if you're interested, although there are. Easy ways of getting into it. And I'll talk briefly about that framework. So what might we want to go into those models?
1:07:29
What characteristics are going to be important. So what set of characteristics you might refer to as susceptibility. Our risk factors associated with you getting the disease. So they could be things like age. Could be things like genetics, could be environmental conditions. Could be whether you were vaccinated could be your infection history, right? And lots of other things we could write down.
1:07:57
They're also gonna be risk factors possibly affected. That affect your chances of passing on the disease if you have it. And we refer to those as. Transmissibility risk factors. Your risk of transmitting the disease. And you can see here that I've written. Essentially the same or not essentially exactly the same. Risk factors because they may be the same. They may not. Right? We can use the model to find that out. But I may be more likely to get the disease if I'm a certain age.
1:08:27
I may be more likely to pass on the disease if I'm a certain age and they may not be the same ages. Similarly, if you think about COVID, say, whether you've been vaccinated, you might think that's gonna affect your susceptibility most and probably it does, but it may affect your likelihood of transmitting. If you've been vaccinated and you produce less pathogen. You're probably less likely to pass it on.
1:08:57
On the other hand, if you've been vaccinated and so then you're very confident. About your own protection, you may be more likely to come into contact with people. So it could go either way. Right. So that 2 things, what we call susceptibility and Transmissibility. And then there's another issue of connectivity. Okay, how far apart are particular susceptible? Infectious individuals and we normally model that in one of 2 ways or possibly both. We look at spatial separation.
1:09:30
So there may be Euclidean distance, it may be, the road distance between individuals, or network based separation. Are you connected in a network? And if you know how closely are you connected and work. And then the sort of modeling framework that we wrote down. For that paper, look like this. So now I've got my. Beta IT which is my the infection rate. I've been susceptible individual I. At a given point in time, I've missed out that time too.
1:10:12
And this works in continuous or discrete time. And I've got something that certainly looks more complicated before, but it's actually very similar to those characteristics I just described. First off, I'm gonna have a susceptibility function for individual I. So that may have those susceptibility risk factors. Age, gender, whatever it is. I then got this, I multiply that by this. Term in parentheses that we often refer to as infectious pressure.
1:10:42
Right, and this sort of does the job that the number of infections was doing in the simple. IR model, but it's more complex. Right. So here what I'm doing is I'm looking at the set of infectious individuals at time t. Alright, so IT here is a set. Should be a curly ID actually to differentiate it. It's a set, it's not the number. And then for each of those, I'm gonna have a transmissibility function. So this is with subscript j now.
1:11:15
And I'm gonna have what we call an infection kernel. Could just go like an infection function. I wish describes the connectivity between individual I who's susceptible. An individual Jay who was infectious. And then we sum over all of those. And then what we also tend to do, I didn't talk about this before, is we add on A bit of random noise. So we have this, epsilon. Function here. Here I've said that it, with a subscript I, so it can vary between individuals can depend on covariance.
1:11:52
And it can change over time. Often we just make this constant. Alright. But that random, function allows for infection coming in from. Outside the area you're looking at. So if I've got a say I'm doing a spatial model, I'll talk about. I've got individuals. That I'm looking at. I have data on those individuals. Well, there may be infections from outside. I just don't observe those, right? Maybe they're in a different jurisdiction, but they can still infect.
1:12:25
Right. So having this term, this random sparks, allows for infections that the main part of the model here. Call and otherwise describe. Okay, and like say we often make it constant. Sometimes you may make it follow, like multiply it by the number of. The total number of infections so it follows the general strength of the epidemic. And then finally Then a big square because that's important. If I want to put this in a discrete time framework.
1:12:55
I have something that look similar to what we had before. So the probability that a susceptible individual eye is infected. At the screen time, a discrete time point T. It's just one minus e to the minus beta. . Okay The big difference is this is now different for every individual, potentially in the population. And a given time point. In terms of the infectious periods. Generally we model that in the same way as before.
1:13:32
We just assume that individuals recover at some rate. Which defines an infectious period. But you could if you wanted to make the infectious period also. We don't tend to do that so much. Okay, so what I'll do is I'll just show you a couple of quick examples. These are very simple examples. So here what I've got He's taking my beta IT. I've essentially set my Seceptibility function to a baseline. Alpha? I've called it. So I'm assuming there's no covariance.
1:14:06
I've done the same thing with the transmissibility, but. For identifiability. Right, oh, so you can reverse those too. So basically I've got no cover, is what I'm saying here. Thank you. Except what I'm going to do is say that the connectivity in my population. My Kappa I. Is going to be D to the minus. Delta. Alright, so Dij there is gonna be the distance between individuals i and JI the susceptible, j the infectious.
1:14:44
And then we raise that some power. When Delta is a positive value. Okay. So this model. Everything's purely spatial. The power law kernel, that spatial kernel. Is going to look something like this for different values of beta. So as the distance between individuals increases the risk of infection goes down. And if I say simulate. And he what I've done is I've simulated across a grid of individuals. Right.
1:15:15
So you could think of this as crops in a field if you like. We started off with some infection in the in the middle there. . The There is going to be my infectious individuals, the black gonna be my removed. I'm what you see is you get this sort of Wave like progression. At each increasing time point. But it's very messy. Infections are more likely to occur close by, but they can go over.
1:15:46
A reasonable distance. So you end up with, I'm not quite sure when that happens here, it might be time point 13, time point 11. That everybody has been infected. Actually, it's not. I can see some just about there. So time point 12 or 13, everyone's infected. But obviously I can put covariance in there as well if there were covariance determining. Risk of susceptibility or transmissibility as well. If we change tack and now think about network. So one of all I've done here is I've replaced that.
1:16:32
Colonel D to the minus delta. With Cij and what's Cij gonna be that here is just going to be A one if I and J have contact. And a 0. Right? So what does have contact mean? That means any sort of contact through which the disease could pass, right? So depending on the disease that may be, are you sexual partners? Do you live in the same house? Is this person in your social network? If we are modeling farm, animal infection, it might be, does your farm share a supplier with.
1:17:06
The other farm, something like that. Or are you in the same field? Right. Those sorts of things. So that would represent some sort of contact network that looks like this. So this is a For a hundred individuals, you can see the way that we've simulated this. We've got individuals in the middle that are highly connected. So high risk of infection. We got individuals that only have one or 2 connections. There were a lower risk. And actually we had a couple over here. Who are, completely separated.
1:17:42
So under this model, unless we had a Sparks term. Those 2 individuals. Labeled 64 and 7 couldn't be infected. But under this model, the disease would pass through that network. And we can do things like. Throw in lots of different networks, right? So we could have a whole bunch of different networks. Domestic connectedness to live in the same house, live in the same region. Do you work in the same building or all sorts of things to make these things more complicated?
1:18:20
The way I set it up here. Yes, we have a binary. A series of binary networks, they don't have to be binary, we could wait these networks, right? So I could put a weight on these edges. The represent different risks. Okay, different likelihoods of spread. And I could make them directional. Right, so I could make it so that. Yes. Point 8 going that way. And, you know, point 4 going the other way. So maybe individual 96 is more likely to infect individual. 16.
1:18:55
And so you'd want some different, waiting there. So you can make these things much more complicated. This slide, this is not from one of my papers, but it just shows briefly. Or gives you an idea of the sort of thing you can do. I said this comes from a study by, Simone Kalchima as, It was from a Pennsylvania elementary school.
1:19:26
Quite small school. And they went in and mostly talked about to the kids. Each of these nodes is representing a child and the edges are representing essentially Are those children friends? So, or did they say that they were friends? Is actually direction in here, I think representing that. And so the you've got this network, a social network essentially. You've got more information.
1:19:50
We've got the color here is showing the agenda. So you can see a lot of gender clustering apart from this guy over here who likes to play with the girls. We've also got I was that kid actually. And then we've also got, Shapes here that show the different. Classes that these children were in. So you, you could throw gender and the class in a susceptibility and transmissibility covariance.
1:20:21
And then the network would go in as the kernel. And what they did was they use this. Essentially is covariates. For a model. Modeling the spread of H one N one. Influenza from 2,009 like what was known as swine flu but we shouldn't really So these things can get quite complicated. This slide I'm not gonna ready to talk about. This is actually from that statistic, I've just put this in there to show that things can be quite complicated.
1:20:57
Right, you can have susceptibility. Transmissibility, You can make it nonlinear. And actually here what I've got is a spatial kernel. Where we have a continuous risk of infection up to some change point which in this case was supposed to represent. Contiguous, adjacent farm spread. And then some power law. After that point, right, where we would, we would estimate this change point. So you can make these things complicated. You make it much more complicated than this actually.
1:21:30
Okay, I'm running out of time, but I'll, we'll spend a couple of minutes on this slide if it's okay. The likelihood for this sort of model is very simple to write down. It looks like this is basically got 2 main components. Over here I've got a a component for my infectious period. And so I'm gonna do this delta. . Yeah I'm gonna say that's my infectious period for the individual J which got infected.
1:22:06
I allow that to follow some distribution. Geometric is common. You could use Poisson or negative binomial. It's essentially, it's equivalent to modeling. Removal in the way that we did before. This is the way we tend to do these models. And then over here I've basically got the infections that are occurring. And if you think what happens at any given time point. I, you have an individual that was susceptible at time t.
1:22:38
Who remains susceptible at time t plus one and they're infected. With probability one minus PIT. Or you get an individual that is infectious at time t plus one, but wasn't infectious at time t. So this is newly infectious. This is like I start from before. And that happens at time. With probability P. And then we take the product over all time. So the likely is very, sorry, conceptually simple. It's like a heterogeneous.
1:23:16
Banui based like, and then a component for the infectious period. However, it can be very computationally cumbersome. If you've got a large population. You have a large amount of probabilities to compute, which will differ between individuals and change whenever there's an infection or a removal. Okay, so there's a lot of computation there. And if you think about sort of the spatial models. As the summation. With this nonlinear term in it as well. So if you code this up.
1:23:54
In an inefficient way. Well, let's put it this way. It's very easy to make this inefficient and for large populations if you're doing MCMC. It can be, very, very slow. That said, and this is my final slide. We actually have 2 our packages for modeling. At the individual level. And each of those has a, a, a paper associated with them. The one that we've talked about today is, or it's relevant to what we've talked about today.
1:24:32
Is a package for modeling in discrete time. It's called there is a paper that basically takes you through shows you how to simulate. Got it here actually shows you how to, well, there's the model. Gives you the basic. Functions there. Talks about how to simulate. Where's my platform? Alright, simulate spatial model, simulate network models. Was the plot. It's got some graphics commands for doing this plotting.
1:25:08
And then, as a network example. And then finally, it's got all the information you need to fit these models using MCMC. So is, I know I'm. Obviously this is my paper, but I think it's a really good introduction to these sorts of models and how to fit them. Okay, there is also we haven't talked about this at all, but the you can do the equivalent thing in continuous time as well.
1:25:40
And that's all detailed in this package. Okay. Alright. So, 1128 by my time, so I'm just about within the 90 min, but I can stay on to answer questions. If you would like, I do see one in the Q&A. So is it possible to apply this model? To an RCT study. It's not possible, what is the correct way? So an RCT study in I assume you mean There's some sort of intervention in the community, but there's different types. In the livestock industry or. Very research. They do and crop research as well.
1:26:20
They're actually, you know, have controlled infections and then yes, you quite often we would use these models. To. To either, you know, try to get in a crop trial, it might be the extent of the spatial spread. Or there might be treatments that we're trying to to ascertain their effectiveness. You can also do our CTs in the community in the So we worked for example a few years ago. On Hong Kong, influenza in Hong Kong. And they were looking trying to look at the effect of vaccinating.
1:26:56
Children in houses. So they, and then so they had a bunch of houses where they vaccinated the children or one child, I think it was. And look to the probability of the other inhabitants getting infected. First is control houses where there was no vaccination. And so yeah, you can apply in. apply these sorts of models there as well. The community model It's much more complex.
1:27:24
It's not more complex. It's much more noisy. Because in influenza season you're obviously not observing the whole population. And you've got a lot of other things going on. But yes. So thank you. Sam, you know you didn't miss something I skipped over completely the prize. It's essentially in this in the same way as before because the prize for these models tend to be We tend to constrain them to be positive.
1:27:56
So for example, we had that the parameters would definitely be positive. So the usual thing is to put a gamma prior on them or half normal or something. If you've got, it tends to be harder to get informative prize on things like the spatial parameter. Especially as now those when you fit these models you do tend to see quite a bit of correlation between these parameters so it's a little harder to do prioritization.
1:28:26
So often we try to aim for non-informative or winkly informative prize. But now all that I talked about before does apply, right? And in the packages we have. 3 or 4. Like. Different prior distributions you can use and you have flexibility to choose the The prior parameters there. Just before you Okay, this is what I was going to address. Carolina will tell you about the next webinar before I thank Rob and, will tell you about the next webinar before I thank Rob and this session.
1:28:53
We'll tell you about the next webinar before I thank Rob and this session. Carolina, please go ahead. Yes, so, thank you so much to Rob for a wonderful webinar. I'm also excited about the next webinar. It will be on an overview of some methods for statistical analysis with missing data. And it will be by Rod Lido, from the University of Michigan. He's one of the world's leading authorities in missing data. Sorry, should be another great one.
1:29:28
So I hope you can join us. Also as Alex said at the beginning, we'd like to enquire you to join ASA. I'm to thank you for making events like this possible for there's a new membership fee for the developing countries which was in reduced substantially to just $10. So just a reminder, and we have, we put some links on the chat for the new talk. As well as earlier for the membership information. Okay, so I'll hand it back over to. Alex.
1:30:00
Oh, I've seen Rod little talk on this subject as well. He's excellent speaker and. I'd highly recommend. That seminar. I just Well, I have to say that there are many messages in the chat thanking you, Rob. And again, I just would like to thank you for sharing with us your expertise on on the modeling of infectious diseases. It was really nice. I would like to remind the participants that the slides and the recording will be available for from the Source website.
1:30:44
The website was posted in the chat. And, as Catalina said, we encourage you to become a member of the American Statistical Association, this initiative wouldn't be possible without the ESA support. And again, this is a webinar that is, organized by the committee on international relations in statistics and statistics without borders, borders, sorry, and we hope to see you on September the twentieth.
1:31:16
And if you do have suggestions of topics that would be interested, interesting for us to consider, please don't hesitate to reach out to Sloca, Carolina or myself or Donna and we will be able, we will be happy to try and bring this topic. Yeah, I think that's it. Thank you and good afternoon. Good evening. Wherever you are in the world, we started the word people from all over as hell as it has been happening in previous editions of the webinar.
Here to help you learn
Sign in to keep a private conversation with your course tutor.
Ask me anything about the material…
Sign in to chat