Site logo

Constructor

mnl(ec as core, model_name as string)

ec

The core object from which to derive this model.

model_name

The name of the model. Using an existing name will automatically load the existing model.

Methods: Setup

var (item_name as string, optional param_value as float, optional constraint as int, optional std_err as float, optional bind_var as string, optional bind_ratio as float) → status as string

item_name

This is a string describing the variable, in standard name format. Use the keyword "CONSTANT" to include an alternative specific constant.

parameter_value

an initial value for the parameter (default=0)

constraint

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

std_err

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

bind_variable_name

where a parameter is constrained equal to another in the same model uses table_name.variable_name[@alternative_name] format of the other parameter default = null string

bind_ratio

the multiplier on the free-floating parameter's value used to create this parameter (default=1)

status

returns OK on success, OOPS on error.

name(model_name as string) → status as string

model_name

The new name of the model.

status

returns OK on success, OOPS on error.

delete_var(item_name as string) → status as int

change_param(item_name as string, param_value as float) → status as string

Changes the current (initial) value of an existing parameter in the model. Returns an ELM standard status string.

change_constrain(item_name as string, constrain_value as int) → status as string

Changes the constrinat setting of an existing parameter in the model. All values other than 0 indicate a constraint, while 0 indicates an unconstrained parameter. Returns an ELM standard status string.

change_binding(item_name as string, bind_name as string, bind_ratio as float) → status as string

Changes the binding of an existing parameter in the model. Returns an ELM standard status string.

cho(var_name as string) → status as string

variable_name

The name of the column for the chosen-ness variable, which appears in the idCA table. To describe chosen-ness in the idCO table, see wgt.

status

returns OK on success, OOPS on error.

wgt(var_name as string) → status as string

reweight(switch as int) → status as int

When a model is estimated with large weight values, two bad things can happen: the optimization process can become overwhelmed and run very slowly, and the standard error of the estimate can appear very small, as the program thinks there are many more observations that there really are. This can be addressed by automatic rebalanceing of weights: the relative weight of observations is not changed, but the overall weightings are reduced so that the total weight equals the number of cases.

switch

1 to turn on automatic rebalancing, 0 to turn off. default=0.

status

returns OK on success, OOPS on error.

Methods: Calculation

est(optional est_mode as int) → status as string

est_mode

0 (default) for regular, 1 for constants only model.

status

returns OK on success, OOPS on error.

predict(var as string, N_Breaks as int, tablename as string) → status as int

The R-Predict tool. Does not currently allow manual setting of break points, only automatic setting. Can only be run on a model that has already been estimated. tablename is the name of the output table in the project file. Any existing table with the same name is overwritten.

Methods: Reporting

print_constraints() → report as string

A summary of the constraints and links on parameters.

print_ll() → report as string

the log likelihood at convergence, constants, and zeros

print_param() → report as string

the parameters, standard errors, and t-statistics

print_covar() → report as string

the covariance table for parameter estimates

print_corr() → report as string

the correlation table for parameter estimates

print_alts() → report as string

counts of available and chosen alternatives

print_optim() → report as string

the optimization results (how many iterations, convergence tolerance, etc.)

print_notes() → report as string

Prints the automatically generated notes on the model.

print_model() → report as string

a summary of the items included in the model

save() → status as int

This records the model to the Core Database. It is called automatically at the end of an estimation run. Re-saving afterwards anyway should be harmless.

load(model_name as string) → status as int