\(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\R}[1]{ {\rm #1} }\) \(\newcommand{\W}[1]{ \; #1 \; }\)
set_command#
View page sourceDirectly Setting Table Values#
Syntax#
dismod_at
database set
option
name valuedismod_at
database set
avgint
data
dismod_at
database set
table_out sourcedismod_at
database set
table_out source sample_indexdatabase#
Is an
http://www.sqlite.org/sqlite/ database containing the
dismod_at
input tables which are not modified.
option#
This documentation is for the case where
option
follows set
.
name#
Is the name of the option we are setting. It must be a valid option_name .
value#
Is the new option_value for the specified option name. If value is the empty string, null is used for the corresponding value in the database; see Text can be Null, not Empty .
init#
The set option commands does not require the init
to be run first.
In addition, if option_name is not parent_node_id
,
the model_variables do not change and you do not have to
re-run the init_command .
avgint#
This documentation is for the case where
avgint
follows set
.
In this case data
must follow avgint
and the avgint_table is set to be equal to the data_table .
The only difference is that the column name
data_id
in the data table has column name
avgint_id
in the avgint table.
table_out#
The table_out cases set the values in table_out using the values specified by source . If this table exists before the command, the values originally in the table are lost.
start_var#
If table_out is start_var
,
the start_var table is created.
Note that this table may also be created directly by the user
(with the aid of the var_table ).
scale_var#
If table_out is scale_var
,
the scale_var table is created.
Note that this table may also be created directly by the user
(with the aid of the var_table ).
truth_var#
If table_out is truth_var
,
the truth_var table is created.
Note that this table may also be created directly by the user
(with the aid of the var_table ).
source#
The set command source must be one of the possibilities listed below (and not be the same as table_out ). Only the case where source is sample has the extra argument sample_index .
sample#
If source is sample
,
sample_index must be present.
In this case the model_variables in the sample table,
and corresponding to the specified sample index,
are used for the values in table_out .
prior_mean#
If source is prior_mean
,
the mean of the priors is used for the values in table_out .
fit_var#
If source is fit_var
,
the results of the previous fit is used for the values in table_out .
start, scale, truth#
If source is start_var , scale_var , or truth_var , the contents of this table are copied to table_out .
Example#
The files set_command.py and set_command.py contains examples and tests using this command.