Generating simulated data with UCIWWEIHR ODE compartmental based model.

This package provides a way to also simulate data using the UCIWWEIHR ODE compartmental based model specified in the future paper. The function called generate_simulation_data_uciwweihr.jl can be used to generate synthetic data for a given number of samples and features. Here we provide a demonstration using the default settings of generate_simulation_data_uciwweihr.jl :

1. Functionality.

using UCIWWEIHR
using Plots
# Running simulation function with defaults
params = create_uciwweihr_sim_params()
df = generate_simulation_data_uciwweihr(params)
first(df, 5)
5×8 DataFrame
Rowobstimeslog_ww_conchosprtwtE_ode_comp_solI_ode_comp_solH_ode_comp_sol
Int64Float64Int64Float64Float64Float64Float64Float64
110.0882519170.997770.349492200.0100.020.0
220.407202211.014680.353323170.442129.5321.6357
330.416729250.9891190.347515150.77149.49724.1411
440.829472301.069040.365335137.051162.98126.8269
550.75552351.109150.373918129.444172.24129.9119

1.2 Visualizing UCIWWEIHR model results.

Here we can make simple plots to visualize the data generated using the Plots package.

1.2.1. Concentration of pathogen genome in wastewater(WW).

plot(df.obstimes, df.log_ww_conc,
    label=nothing,
    xlabel="Obstimes",
    ylabel="Conc. of Pathogen Genome in WW",
    title="Plot of Conc. of Pathogen Genome in WW Over Time")
Example block output

1.2.2. Hospitalizations.

plot(df.obstimes, df.hosp,
    label=nothing,
    xlabel="Obstimes",
    ylabel="Hosp",
    title="Plot of Hosp Over Time")
Example block output

1.2.3. Reproductive number.

plot(df.obstimes, df.rt,
    label=nothing,
    xlabel="Obstimes",
    ylabel="Rt",
    title="Plot of Rt Over Time")
Example block output

1.2.4. Hospitalization rate.

plot(df.obstimes, df.wt,
    label=nothing,
    xlabel="Obstimes",
    ylabel="Rt",
    title="Plot of Hospitalization Rate Over Time")
Example block output

2. Alternate Functionality.

We can also use a prespecified effective repordcution number curve or a prespecified hospitaliation probability curve. Any combintation of presepcified or random walk curves can be used. Here we provide an example of using both a prespecified effective reproduction number curve and a prespecified hospitalization probability curve.

using UCIWWEIHR
using Plots
# Running simulation function with prespecified Rt and hospitalization probability
rt_custom = vcat(
    range(1, stop=1.8, length=7*4),
    fill(1.8, 7*2),
    range(1.8, stop=1, length=7*8),
    range(0.98, stop=0.8, length=7*2),
    range(0.8, stop=1.1, length=7*6),
    range(1.1, stop=0.97, length=7*3)
)
w_custom = vcat(
    range(0.3, stop=0.38, length=7*5),
    fill(0.38, 7*2),
    range(0.38, stop=0.25, length=7*8),
    range(0.25, stop=0.28, length=7*2),
    range(0.28, stop=0.34, length=7*6),
    range(0.34, stop=0.28, length=7*2)
)
params = create_uciwweihr_sim_params(
    time_points = length(rt_custom),
    Rt = rt_custom,
    w = w_custom
)
df = generate_simulation_data_uciwweihr(params)
first(df, 5)
5×8 DataFrame
Rowobstimeslog_ww_conchosprtwtE_ode_comp_solI_ode_comp_solH_ode_comp_sol
Int64Float64Int64Float64Float64Float64Float64Float64
110.0882519171.00.3200.0100.020.0
220.407232241.029630.302353170.472129.53420.8895
330.417008261.059260.304706151.061149.53822.6036
440.831089331.088890.307059138.675163.24524.7014
550.759119261.118520.309412131.196172.86226.9223

2.2 Visualizing UCIWWEIHR model results.

We can visualize these results using the Plots package.

2.2.1. Concentration of pathogen genome in wastewater(WW).

plot(df.obstimes, df.log_ww_conc,
    label=nothing,
    xlabel="Obstimes",
    ylabel="Conc. of Pathogen Genome in WW",
    title="Plot of Conc. of Pathogen Genome in WW Over Time")
Example block output

2.2.2. Hospitalizations.

plot(df.obstimes, df.hosp,
    label=nothing,
    xlabel="Obstimes",
    ylabel="Hosp",
    title="Plot of Hosp Over Time")
Example block output

2.2.3. Reproductive number.

plot(df.obstimes, df.rt,
    label=nothing,
    xlabel="Obstimes",
    ylabel="Rt",
    title="Plot of Rt Over Time")
Example block output

2.2.4. Hospitalization rate.

plot(df.obstimes, df.wt,
    label=nothing,
    xlabel="Obstimes",
    ylabel="Rt",
    title="Plot of Hospitalization Rate Over Time")
Example block output

Tutorial Contents