Site logo

Index of Models

CREATE TABLE elm_models( model_name text UNIQUE, model_style int, estimated int, log_likelihood double, ll_constants double, ll_zeros double, optimization_options text, num_cases int, chosen_var_idCA text, weight_var_idCO text, time_estimate double, time_dataread double, time_errors double, iterations int, notes text, spec text, last_changed text DEFAULT CURRENT_TIMESTAMP);

model_name text

The name of the model.

model_style int

the style of the model

  • 1 = mnl
  • 2 = nl

estimated int

whether the model has been estimated

  • 0 = no
  • 1 = yes
  • -1 = yes but did not converge

log_likelihood double

log likelihood at convergence

ll_constants double

log likelihood for the constants only model

ll_zeros double

log likelihood for the zero parameters model

optimization_options text

a semicolon delimited list of optimization option strings

num_cases int

the number of cases used to estimate the model

chosen_var_idCA text

the column name (in the idCA dataset) of the chosen-ness variable

weight_var_idCO text

the column name (in the idCO dataset) of the case weight

time_estimate double

the time used to estimate the model parameters

time_dataread double

the time used to read the data

time_errors double

the time used to calculate the standard error of the estimate

iterations int

the number of iterations

notes text

a '\n' delimited list of model notes

spec text

a '\n' delimited list of model commands specific to the model type

Model Tables

CREATE TABLE model_XXX ( parameter_name text, table_source text, node_code int, parameter_type int, param_value double, param_constraint int, param_stderr double, param_t_stat double, nest_members blob, bind_item text, bind_ratio double);

Creating and populating this table and the associated row of the elm_models table is a valid way to specify a model.

parameter_name text

the parameter name, in variable_name[@alternative_name] format for beta parameters, logsum name for nests

table_source text

the table in which the variable appears, NULL if not applicable

parameter_type int

the parameter type.

  • 0 = NONE
  • 0x1 = LINEAR
  • 0x2 = LINEAR_ALTSPEC
  • 0x4 = GROUP_LINEAR
  • 0x8 = GROUP_LINEAR_ALTSPEC
  • 0xF = BASIC_VAR
  • 0x10 = SPREAD_POINT
  • 0x60 = SPREAD_NORMAL
  • 0x20 = SPREAD_TRIANGLE
  • 0x40 = SPREAD_UNIFORM
  • 0x80 = SPREAD_LOGNORMAL
  • 0x100 = QUANT
  • 0x200 = QUANT_ALTSPEC
  • 0x400 = GROUP_QUANT
  • 0x800 = GROUP_QUANT_ALTSPEC
  • 0x1000 = QUANT_SCALE
  • 0x2000 = LOGSUM

param_value double

on input, an initial value for the parameter; on output, the estimated value

param_constraint int

a 1 to indicate the parameter is constrained to the initial value, 0 otherwise (default=0)

param_stderr double

the standard error of the initial parameter (assumes that parameter was estimated already)

bind_item text

the parameter name, in variable_name[@alternative_name] format, of the binding parameter, or null if not applicable

bind_ratio double

the multiplier on the free-floating parameter's value used to create this parameter

nest_members text

the node_codes of the nests’s members, as a comma delimited string of integers stored in blob format

node_code int

the node code of the associated alternative or node

param_t_stat double

the t-statistic of the parameter estimate, when compared against zero (one for logsum parameters)

Options

CREATE TABLE options (name text UNIQUE, value text);

name text UNIQUE

The name of the option. Any option names can be set, the program will simply ignore options that are not valid.

value text

the value of the option