------------------------------------------------------- lines 5-107 of file: xrst/table/rate_eff_cov_table.xrst ------------------------------------------------------- {xrst_begin rate_eff_cov_table} {xrst_spell attaches } The Rate Effect Covariate Table ############################### Improvements ************ This table is a quick fix for the problem below. It uses the existing :ref:`weight_table-name` to represent an arbitrary bilinear function. A better fix would separate the covariate grid from the covariate values so that: #. The grid does not need to be repeated when only values change. #. weights are not used for purposes other than weighting. Problem ******* The data table only assigns one value for each covariate to each data point; see :ref:`data_table@Covariates` in the data table. This works fine for most cases. The problem is when a covariate multiplier affects a :ref:`mulcov_table@mulcov_type@rate_value` , and the covariate values changes with age or time , and the measurement is for an :ref:`ode integrand `. Solution ******** This table attaches a bilinear function of age and time to each covariate, node, and :ref:`option_table@splitting_covariate` value. The covariate values in this table are used, to compute covariate multiplier effects, when all the following conditions hold: #. The covariate appears in this table . #. The multiplier type is :ref:`mulcov_table@mulcov_type@rate_value` . If the conditions above do not hold, the :ref:`data table ` in the data and avgint tables are used to compute covariate multiplier effects. Optional ******** This table is optional. The case where there is not ``rate_eff_cov`` table in the database is the same as when the table has not entries. rate_eff_cov_id *************** This column has type ``integer`` and is the primary key for the ``rate_eff_cov`` table. Its initial value is zero, and it increments by one for each row. covariate_id ************ This column has type ``integer`` and is the :ref:`covariate_table@covariate_id` corresponding to this row. The covariate_id corresponding to the splitting covariate cannot appear in this column; i.e., the splitting covariate value is constant with respect to age and time. node_id ******* This column has type ``integer`` and is the :ref:`node_table@node_id` corresponding to this row. split_value *********** This column has type ``real`` and is the value of the splitting corresponding to this row. This value is not used when the splitting covariate is ``null`` . weight_id ********* This column has type ``integer`` and is the :ref:`weight_table@weight_id` corresponding to this row. As a quick fix, we use *weight_id* to identify an arbitrary bilinear functions of age and time. Rectangular Grid **************** For each *covariate_id* that appears in this table, each *node_id* in the node table, each splitting covariate value in the data table, and each splitting covariate value in the avgint table, there must be one an only one row with that *covariate_id*, *node_id*, and splitting covariate value. Example ******* The file :ref:`rate_eff_cov_table.py-name` contains an example ``rate_eff_cov`` table. {xrst_toc_hidden example/table/rate_eff_cov_table.py } {xrst_end rate_eff_cov_table}