Interface¶
The base interface is DismodSQLite
, and the input and output class has getters and setters
for each of the tables (DismodIO
, not documented here).
To use a DismodIO(DismodSQLite)
interface, you can do
from cascade_at.dismod.api.dismod_io import DismodIO
file = 'my_database.db'
db = DismodIO(file)
# Tables are stored as attributes, e.g.
db.data
db.age
db.time
db.prior
# Tables can be set with
db.data = pd.DataFrame(...)
-
class
cascade_at.dismod.api.dismod_sqlite.
DismodSQLite
(path)[source]¶ Bases:
object
Initiates an SQLite reader from the path.
- Parameters
path (
Union
[str
,Path
]) – A string or Path pointing to the DisMod database file.
-
update_table_columns
(table_name, table)[source]¶ Updates the table columns with additional columns like “c_” which are comments and “x_” which are covariates.