----------------------------------------------- lines 5-214 of file: xrst/table/rate_table.xrst ----------------------------------------------- {xrst_begin rate_table} {xrst_spell exp ik } The Rate Table ############## Discussion ********** The ``rate`` table is used to set the smoothing for each of the rates. It has the following columns: rate_id ******* This column has type ``integer`` and is the primary key for this table. Its initial value is zero, and it increments by one for each row. rate_name ********* The following values, and only the following values, appear in the *rate_name* column: .. csv-table:: :widths: auto *rate_name*,Description ``pini``,initial prevalence ``iota``,model susceptible incidence ``rho``,model remission ``chi``,model excess mortality ``omega``,model other cause mortality In addition, these values must appear in the order above. (Note that this column is unique; i.e., each name only appears once.) pini ==== The initial :ref:`avg_integrand@Integrand, I_i(a,t)@prevalence` *pini* is the model for prevalence at the initial age; i.e., the minimum :ref:`age_table@age` corresponding in the age table; see :ref:`p_i,0(t)` . If *rate_name* is ``pini`` , the *parent_smooth_id* and *child_smooth_id* smoothings must have :ref:`smooth_table@n_age` equal to one. This is because prevalence at the initial age is only a function of time, and does not depend on age. Note that, unlike the other rates, initial prevalence is not a rate in the :ref:`avg_integrand@Ordinary Differential Equation` . On the other hand, and like the other rates, initial prevalence is a necessary input to solve the ODE. iota ==== The model for susceptible incidence rate *iota* is the rate at which people who are in the susceptible state *S* transfer to the with condition state *C* ; see :ref:`iota_i(a, t)` . rho === The model for remission rate *rho* is the rate at which people who are in the with condition state *C* transfer to the susceptible state *S* ; see :ref:`rho_i(a, t)` . chi === The model for excess mortality rate *chi* is the rate at which people who are in the with condition state *C* die from the condition; see :ref:`chi_i(a, t)` . omega ===== The model for other mortality rate *omega* is the rate at which people who are in either state, *S* or *C* , die from causes other than the condition; see :ref:`omega_i(a, t)` . parent_smooth_id **************** This column has type ``integer`` and its value is a :ref:`smooth_grid_table@smooth_id` in the ``smooth_grid`` table. It specifies the smoothing used as a prior for this rate when fitting the parent (fixed effects); see :ref:`option_table@Parent Node` . null ==== If the *parent_smooth_id* is ``null`` , the corresponding parent rate is always zero and no :ref:`model_variables-name` are allocated for it. child_smooth_id *************** This column has type ``integer`` and its value is a :ref:`smooth_grid_table@smooth_id` in the ``smooth_grid`` table. It specifies a single smoothing used as a prior for the :ref:`model_variables@Random Effects, u@Child Rate Effects` for this rate. Random Effects Hessian ====================== The Hessian of the joint likelihood with respect to the random effects must be positive definite. If the data does not ensure this, the user will have to make the standard deviation for the prior of the random effects small. null ==== If *child_smooth_id* is not ``null`` , *child_nslist_list* must be ``null`` . If both are ``null`` , there are no :ref:`random effects` . for this rate. child_nslist_id *************** This column has type ``integer`` and is a :ref:`nslist_pair_table@nslist_id` . If it is not ``null`` , it identifies a list of ( *node_id* , *smooth_id* ) pairs. The *node_id* for each of the :ref:`option_table@Parent Node@Children` must appear in the list. The corresponding smoothing is used for the child rate effects for the rate corresponding to this row of the rate table. null ==== If *child_nslist_list* is not ``null`` , *child_smooth_id* must be ``null`` . If both are ``null`` , there are no :ref:`random effects` . for this rate. Child Value Priors ****************** The priors corresponding to child smoothing :ref:`smooth_grid_table@value_prior_id` are called child value priors. It is important to remember that these priors correspond to the :ref:`model_variables@Random Effects, u` . The rate in the differential equation, used for a child, is ``exp`` ( *u* )* *q* where *q* is the corresponding rate for the parent; see :ref:`r_ik` . Constant ======== If the :ref:`prior_table@lower` and :ref:`prior_table@upper` limit are equal, they must be finite. In this case we refer to a child value prior as constant. Not Constant ============ If a child value prior is not constant, it must satisfy the following conditions: #. The :ref:`prior_table@density_id` must not correspond to a :ref:`density_table@Notation@Nonsmooth` density. #. The :ref:`prior_table@lower` limit (:ref:`prior_table@upper` limit) must be ``null`` , which gets interpreted as minus infinity (plus infinity); see :ref:`database@Null@Bounds` . #. Note that :ref:`option_table@Optimize Random Only@bound_random` is used for the lower and upper limits of during the optimization of the random effects. On the other hand, plus and minus infinity is used for the lower and upper limit when :ref:`install_unix@Special Requirements@cppad_mixed` approximates the integrals with respect to the :ref:`random effects` . Child Difference Priors *********************** The priors corresponding to child smoothing :ref:`smooth_grid_table@dage_prior_id` and :ref:`smooth_grid_table@dtime_prior_id` are called child difference priors. These priors must satisfy the following conditions: #. The :ref:`prior_table@density_id` must not correspond to a :ref:`density_table@Notation@Nonsmooth` density. #. The :ref:`prior_table@lower` limit (:ref:`prior_table@upper` limit) must be ``null`` , which gets interpreted as minus infinity (plus infinity). {xrst_toc_hidden example/table/rate_table.py } Example ******* The file :ref:`rate_table.py-name` contains an example ``rate`` table. {xrst_end rate_table}