Displaying 1 result from an estimated 1 matches for "total_pop".
Did you mean:
total_log
2009 Apr 04
1
Problem with sample()
...get) {
xmat[i,]=x
i=i+1
target=target+dt
if (i>n)
return(ts(xmat,start=0,deltat=dt))
}
j=sample(v,1,prob=h) #################error###########
x=x+S[,j]
}
}
#Set initial parameters
susceptible = 199
infectious = 1
recovered = 0
total_pop = susceptible + infectious + recovered
#Time to run simulation
time = 1000
#Recovery rate
r = 1/9
#Transmission rate
B = 0.25 / total_pop
################Rates################
p0 = B * 0.6721747879762630000000
p1 = B * 0.0885920745659092000000
p2 = B * 0.0475394709752211000000
p3 = B * 0.0...