--------------------------------------------------- lines 6-75 of file: example/user/zero_meas_value.py --------------------------------------------------- {xrst_begin user_zero_meas_value.py} {xrst_spell bmi } Exclude Measurement Value Covariate Multipliers From Predictions ################################################################ Purpose ******* The measurement value covariate multipliers are intended to represent biases in measurements. The :ref:`predict_command@zero_meas_value` option for the predict command enables one to exclude these biases during predictions. no_effect_iota_true ******************* The only rate in this example is iota. The value of this rate, before any effects, used to simulate the data is {xrst_code py}''' no_effect_iota_true = 1e-2 r'''{xrst_code} reference_income **************** Income is a covariate between zero and one and its reference value is 1: {xrst_code py}''' reference_income = 1.0; r'''{xrst_code} beta_income_true **************** The higher income, the more likely that incidence will be recorded. We model this using a meas_value covariate multiplier one income. The value of this multiplier used to simulate the data is {xrst_code py}''' beta_income_true = 0.5; r'''{xrst_code} reference_bmi ************* Body mass index, bmi, is a covariate and its reference value is 20: {xrst_code py}''' reference_bmi = 20.0; r'''{xrst_code} beta_bmi_true ************* The high bmi, the more likely that the disease will be contracted. We model this using a rate_value covariate multiplier on bmi. The value of this multiplier (used to simulate the data is {xrst_code py}''' beta_bmi_true = 1.0 / 5.0 r'''{xrst_code} n_data ****** The number of simulated data points for this example is {xrst_code py}''' n_data = 10 r'''{xrst_code} Source Code *********** {xrst_literal # BEGIN PYTHON # END PYTHON } {xrst_end user_zero_meas_value.py}