next up previous index
Next: RegressionModel Class Up: ChoiceModel Class Previous: The Run Method   Index

The Estimate Method

The estimate() method runs an estimation of coefficients on basis of a given specification.

Input:

specification
- an instance of class EquationSpecification specifying variables to be used in the estimation.
agent_set
- a Dataset representing the whole set of agents to be used for the variable computation.
agents_index
- an index within the agent_set determining which agents will be used for the estimation. If it is not given, all agents are considered.
procedure
- a character string giving the fully qualified name of the estimation procedure. This argument can be also passed via estimate_config as an entry 'estimation'.
data_objects
- a dictionary containing other datasets and arguments needed for computing variables.
estimate_config
- additional Resources for controlling the estimation run.

Algorithm
In addition to agents_index, the number of agents entering the estimation can be controlled by an entry 'estimation_size_agents' in estimate_config which should have a value between 0 and $ 1$. It gives the portion of agents_index (or agent_set if agents_index is not given) that will be used in the estimation. The indices are then randomly sampled. The agent_set should contain an attribute of the same name as the unique identifier of the class attribute choice_set. Its values determine the current choices of the agents.

As in the run() method, an interaction set is created and the variables given in the specification are computed. Then for each submodel the corresponding data matrix is built and the run() method of the class given by the argument procedure (or alternatively by an entry ``estimation'' in estimate_config) is called, passing the data array, the class attribute upc_sequence and estimate_config (after adding entries needed for the estimation) as arguments (see Section 7.6.6 for more details). From the returned dictionary, items ``estimators'', ``standard_errors'', ``other_measures'' and ``other_info'' are extracted. After results from all submodels are collected, a Coefficient object is created using those extracted values.

Output
The method returns a tuple of the created Coefficient object and a dictionary with entries for each submodel equals a dictionary returned by the run() method of procedure for that submodel.


next up previous index
Next: RegressionModel Class Up: ChoiceModel Class Previous: The Run Method   Index
info (at) urbansim.org