R/basic.R
basic.RdThe basic sircovid model
The "basic" sircovid model. This is a dust model.
# Set up the basic model for England with default parameters and # an initial seeding of early February: p <- basic_parameters(sircovid_date("2020-02-07"), "england") mod <- basic$new(p, 0, 10) # Set the initial state and index as we would us for a run # (without setting an initial state there is no seeding) initial <- basic_initial(mod$info(), 10, p) mod$set_state(initial$state, initial$step)#> NULLmod$set_index(basic_index(mod$info())$run) # Run the model up to the end of march step_end <- sircovid_date("2020-03-31") / p$dt # The filtered state is returned at the end of the run mod$run(step_end)#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] #> icu 29 15 18 25 21 32 12 13 17 11 #> deaths 120 33 63 57 71 109 44 26 74 48#> [,1] [,2] [,3] [,4] [,5] [,6] #> [1,] 91.00 91.00 91.00 91.00 91.00 91.00 #> [2,] 56286961.00 56286961.00 56286961.00 56286961.00 56286961.00 56286961.00 #> [3,] 29.00 15.00 18.00 25.00 21.00 32.00 #> [4,] 120.00 33.00 63.00 57.00 71.00 109.00 #> [5,] 0.08 0.08 0.08 0.08 0.08 0.08 #> [6,] 3294825.00 3297696.00 3296859.00 3296352.00 3296539.00 3295575.00 #> [,7] [,8] [,9] [,10] #> [1,] 91.00 91.00 91.00 91.00 #> [2,] 56286961.00 56286961.00 56286961.00 56286961.00 #> [3,] 12.00 13.00 17.00 11.00 #> [4,] 44.00 26.00 74.00 48.00 #> [5,] 0.08 0.08 0.08 0.08 #> [6,] 3298051.00 3298327.00 3296888.00 3298109.00