----------------------------------------------- lines 5-78 of file: example/user/no_children.py ----------------------------------------------- # {xrst_begin user_no_children.py} # {xrst_comment_ch #} # # Case with no Children; i.e., no Random Effects # ############################################## # # Integrands # ********** # There is an integrand that directly measures each of the model rates; i.e., # :ref:`avg_integrand@Integrand, I_i(a,t)@Sincidence` , # :ref:`avg_integrand@Integrand, I_i(a,t)@remission` , # :ref:`avg_integrand@Integrand, I_i(a,t)@mtexcess` , and # :ref:`avg_integrand@Integrand, I_i(a,t)@mtother` . # In addition the integrand prevalence is included, but is data values # are for age zero which corresponds to the # :ref:`rate_table@rate_name@pini` rate. # # Nodes # ***** # There are four nodes in this example. # The world node has one child, north_america. # The north_america node has two children, united_states and canada. # The :ref:`parent_node` is canada which # does not have any children. # # Data # **** # All of the data corresponds to canada. # There is one data point for each integrand and it is the true value # for the corresponding rate; i.e., there is no noise in this data. # {xrst_spell_off} # {xrst_code py} integrand2rate = { 'prevalence': 'pini' , 'Sincidence': 'iota' , 'remission': 'rho' , 'mtexcess' : 'chi' , 'mtother': 'omega' , } rate_true = { 'pini' : 1e-2 , 'iota' : 2e-2 , 'rho' : 3e-2 , 'chi' : 4e-2 , 'omega' : 5e-2 , } # The data is modeled as if it had noise. # {xrst_code} # {xrst_spell_on} # # Outlier # ======= # There is also one outlier at the end of the data table with # :ref:`data_table@hold_out` equal to one. # # Smoothing # ********* # There is a smoothing the for each of the possible rates for the # parent node canada. # There is no child node smoothing. # The value priors for this smoothing is uniform with lower limit 1e-4 # and upper limit 1.0. The mean 0.1, is only used as a starting point # for the optimization. # The time difference prior for this smoothing is # gaussian with mean zero and standard deviation 1e-2. # # Source Code # *********** # {xrst_literal # BEGIN PYTHON # END PYTHON # } # # {xrst_end user_no_children.py}