--------------------------------------------------------- lines 5-81 of file: example/get_started/get_started_db.py --------------------------------------------------------- # {xrst_begin get_started_db.py} # {xrst_spell # ik # } # {xrst_comment_ch #} # # Create get_started Input Tables: Example and Test # ################################################# # # Syntax # ****** # ``get_started_db.get_started_db`` () # # Discussion # ********** # The python command above creates the database ``get_started.db`` # in the current working directory. # This is a very simple case where: # # #. All of the rates are zero except for # :ref:`rate_table@rate_name@omega` . # #. There is only one node corresponding to the world, and hence there are no # :ref:`option_table@Parent Node@Children` or # :ref:`random effects` . # #. There is only one measurement and it is for the # :ref:`integrand_table@integrand_name` # :ref:`avg_integrand@Integrand, I_i(a,t)@susceptible` # and at age 50 and year 2000. # #. The data table has a # :ref:`comment column` # named ``c_data_info`` that is used as a # :ref:`data_extra_column` . # #. There is one # :ref:`covariate` income and a corresponding # covariate multiplier on the # :ref:`rate value` for # :ref:`omega` . # #. The model for other cause mortality # :ref:`rate_table@rate_name@omega` , # and the model for the rate covariate multiplier # :ref:`alpha` , # are constant in age and time. # # Because other cause mortality and the covariate multiplier are # constant in age and time, # the susceptible population satisfies the # following ODE in age :math:`a`: # # .. math:: # # S(0) = 1 \W{\R{and}} S'(a) = - \exp( \alpha x ) \omega S(a) # # where :math:`\omega` is the other cause mortality rate # before the covariate effect, # :math:`x` is the value of the income for this measurement, # :math:`\alpha` is the covariate multiplier, and # :math:`\exp ( \alpha x ) \omega` # is the other cause mortality after the covariate effect; # see :ref:`r_ik` . # The solution is # # .. math:: # # S(a) = \exp \left[ - \exp( \alpha x ) \omega \; a \right] # # Reference # ********* # See :ref:`create_database-name` . # # Source Code # *********** # {xrst_literal # BEGIN PYTHON # END PYTHON # } # # {xrst_end get_started_db.py}