#### Infection model######Infection Model ### gridxy xyid population plot(population$x, population$y, xlab= "x", ylab= "y") epigen id x y n inftime distance k inftime[k] for(i in 1:n){ if(i != k){...



#### Infection model######Infection Model ###


gridxy


xyid
population
plot(population$x, population$y, xlab= "x", ylab= "y")
epigen id x y n inftime distance k inftime[k]

for(i in 1:n){ if(i != k){

distance[i] d pi2 u if(pi2 > u){ inftime[i] } } } dataout return(dataout)}
epidatatable(epidata[,4])


t1ind
t2ind
par(mfrow= c(1,2))
plot(epidata$x, epidata$y , xlab="x", ylab="y", main="Epidemic simulation at time 1")points(epidata$x[t1ind], epidata$y[t1ind],pch=20, col="red")
plot(epidata$x, epidata$y , xlab="x", ylab="y", main="Epidemic simulation at time 2")points(epidata$x[t1ind], epidata$y[t1ind],pch=20, col="red")points(epidata$x[t2ind], epidata$y[t2ind],pch=20, col="blue")




this is the sample code for 100. I need to do it by editing this code upto 625. The hint is we need to use two loops such as time loop t to get out put for 4 time points and j loop to calculate the distance but after each time loop we need to add the distance as there is summation,,,,,,,,,,,,,
Jan 15, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here