---------------------------------------------------- lines 7-64 of file: at_cascade/csv/covariate_same.py ---------------------------------------------------- {xrst_begin csv.covariate_same} Determine Which Covariates in covariate.csv Are the Same ######################################################## Prototype ********* {xrst_literal , # BEGIN_DEF, # END_DEF # BEGIN_RETURN, # END_RETURN } covariate_table *************** Is a ``list`` of ``dict`` representation of a :ref:`csv.simulate@Input Files@covariate.csv` file. All of the columns in this table have been converted to ``float`` except for *node_name* and *sex* which have type ``str`` . In addition, *sex* equal to ``both`` may have been added; see :ref:`csv.covariate_both-name` . cov_name ======== We use *cov_name* for ``omega`` or one of the :ref:`covariate_names ` that appear in this file. cov_same ******** For a *node_name* , *sex*, and *cov_name* is *covariate_table* {xrst_code py} (node_other, sex_other, cov_other) = cov_same[ (node_name, sex, cov_name) ] {xrst_code} #. If follows that *cov_other* == *cov_name*; i.e., the covariate column for these two triples is the same. #. For each age, time, the *cov_name* value corresponding to (node_name, sex, cov_name) is the same as the *cov_other* value corresponding to (node_other, sex_other, cov_other). #. There is one and only one value of (node_other, sex_other, cov_other) for all the (node_name, sex, cov_name) triples that have the same *cov_name* value for each age and time. Side Effects ************ This routine reports and error if the age-time grid is not rectangular and the same for each (node_name, sex) pair. Example ******* see :ref:`csv.cov_same_xam-name` . {xrst_end csv.covariate_same}