----------------------------------------------------- lines 6-71 of file: example/user/average_integrand.py ----------------------------------------------------- {xrst_begin user_average_integrand.py} Using the Python average_integrand Utility ########################################## See Also ******** :ref:`user_data_sim.py-name` Random Effects ************** There are no random effects in this example. Priors ****** The priors do not matter for this example except for the fact that the :ref:`truth_var_table-name` values for the :ref:`model_variables-name` must satisfy the lower and upper limits in the corresponding priors. Simulation ********** The simulation value for *iota* is bilinear function with the following values: .. csv-table:: :widths: auto iota,age,time 0.01,0,2000 0.02,100,2000 0.03,0,2020 0.04,100,2020 All the other rates are zero for this simulation. Model ***** The only non-zero rate in this model is the parent iota. The (age, time) grid for the iota model are (0,2000), (100,2000), (0, 2020), (100, 2020). This, if there is no noise in the measurements, the model should fit the data perfectly. Data **** There are *n_data* measurements of prevalence and each at a randomly selected age between 0 and 100 and random time between 2000 and 2020. There is no measurement noise in the simulated data, but it is modeled as having measurement noise. ode_step_size ************* This example uses a very small :ref:`option_table@Age Average Grid@ode_step_size` to test that both the dismod_at and :ref:`average_integrand-name` integrators are working properly. Source Code *********** {xrst_literal # BEGIN PYTHON # END PYTHON } {xrst_end user_average_integrand.py}