Prev Next csv2db_command

@(@\newcommand{\B}[1]{ {\bf #1} } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\W}[1]{ \; #1 \; }@)@This is dismod_at-20221105 documentation: Here is a link to its current documentation .
Conversion of a Csv File to a Dismod_at Database

Deprecated
Syntax
     As Program
     As Python Function
See Also
Example
mtall
mtother
     Constraint
     Age-Time Pairs
     Rectangular Grid
     hold_out
     Rate Grid
Predictions
database
configure_csv
     non_zero_rates
measure_csv
integrand
     Sincidence
     remission
     mtexcess
     mtother
     mtwith
     susceptible
     withC
     prevalence
     Tincidence
     mtspecific
     mtall
     mtstandard
     relrisk
age_lower
age_upper
time_lower
time_upper
meas_value
meas_std
hold_out

Deprecated
This command was deprecated on 2021-12-05.

Syntax

As Program
dismodat.py database csv2db configure_csv measure_csv

As Python Function
dismod_at.csv2db_command(databaseconfigure_csvmeasure_csv)

See Also
get_started

Example
This command has limited capability and is only meant as an example to help one get started using dismod_at. See user_csv2db.py for an example that uses this command.

mtall
The all cause mortality data mtall in the measure_csv file has special meaning. We assume it has been converted to constraints on other cause mortality; see mtother below. For this reason, it should not be included when fitting, and is only in measure_csv as a check that the desired values are satisfied (by checking residuals in a data fit). For this reason, hold_out must be one for all the mtall data; i.e., it is not included during a fit.

mtother

Constraint
The other cause mortality data mtother in the measure_csv file has special meaning. It is intended to represent the all cause mortality data as constraints on other cause mortality in the model. To be specific, the meas_value is a constraint on @(@ \omega @)@ at the corresponding age-time pairs.

Age-Time Pairs
Each row with integrand = mtother must have age_lower == age_upper and time_lower == time_upper .

Rectangular Grid
The mtother data must be specified on a rectangular grid; i.e., each age that appears, appears in one and only one row for every time that appears. This property can also be stated as each time that appears, appears in one and only one row for every age that appears.

hold_out
The hold_out must be one for all the mtother data because it is a constraint, not data, during a fit.

Rate Grid
All of the non zero rates use the age-time grid corresponding the mtother data. In other words, they are modeled as piecewise bilinear between the age-time points at which mtother is specified.

Predictions
The avgint_table is set up so that predictions for the integrands Sincidence , remission , mtexcess , corresponding to the value of the rates iota, rho, chi on the rectangular grid . Only the non-zero rates are included. Predictions for prevalence in the rectangular grid are also included.

database
This argument is an str containing the name of the dismod_at database file that is written by this command.

configure_csv
This argument is an str containing the configuration file name and must end with the .csv extension. The first row contains the following column names name, value. Column names that begin with c_ are comments and will not be used by future versions of csv2db. The configuration options are documented by the corresponding name below.

non_zero_rates
The value in this row is a list rates that are non-zero in the model. The possible rates are pini, iota, rho, chi, omega. The rates in the list are separated by a single space and omega must appear in the list. There is no default value for this value; i.e., it must appear.

measure_csv
is an str containing the data file name and must end with the .csv extension. Each row of the data file corresponds to one data point. The first row of the file contains the column names. The other rows correspond to data points. Each column of the necessary columns in the data file is documented under its column name below. Column names that begin with c_ are comments and will not be used by future versions of csv2db.

integrand
This column of measure_csv contains one of the valid integrands:

Sincidence
The incidence rate relative to susceptible population: @(@ \iota @)@.

remission
The remission rate: @(@ \rho @)@.

mtexcess
The excess mortality rate: @(@ \chi @)@.

mtother
The other cause mortality rate: @(@ \omega @)@.

mtwith
The with condition mortality rate: @(@ \omega + \chi @)@.

susceptible
The susceptible fraction of the population: @(@ S @)@.

withC
The with condition fraction of the population: @(@ C @)@.

prevalence
The prevalence of the condition: @(@ P = C / [ S + C ] @)@.

Tincidence
The incidence rate relative to the total population: @(@ \iota [ 1 - P ] @)@.

mtspecific
The cause specific mortality rate: @(@ \chi P @)@.

mtall
The all cause mortality rate: @(@ \omega + \chi P @)@.

mtstandard
The standardized mortality ratio: @(@ [ \omega + \chi ] / [ \omega + \chi P ] @)@.

relrisk
The relative risk: @(@ [ \omega + \chi ] / \omega @)@.

age_lower
This column of measure_csv contains The initial age for averaging the integrand for this row; @(@ b @)@.

age_upper
This column of measure_csv contains the final age for averaging the integrand for this row; @(@ c @)@.

time_lower
This column of measure_csv contains the initial time for averaging the integrand for this row; @(@ r @)@.

time_upper
This column of measure_csv contains the final time for averaging the integrand for this row; @(@ s @)@.

meas_value
This column of measure_csv contains the value of the average integrand plus measurement noise @[@ e + \frac{1}{c-b} \frac{1}{s-r} \int_b^c \int_r^s I(a , t) \; da \; dt @]@ where @(@ e @)@ is the measurement noise, @(@ a @)@ and @(@ t @)@ are the age and time integration variables, and @(@ I(a, t) @)@ is the value of the integrand for this row.

meas_std
This column of measure_csv contains the standard deviation of the measurement noise @(@ e @)@.

hold_out
This column of measure_csv contains either zero or one. If it is one, this row is included dismod_at fits. Otherwise it is excluded. In either case, the residuals are computed for this row.
Input File: python/dismod_at/csv2db_command.py