next up previous index
Next: Sampler Class Up: Model Components Previous: Regression Class   Index


EstimationProcedure Class

This class is an abstract class for modules that implement estimation of coefficients for one of the available models. bhhh_mnl_estimation implements the BHHH estimation algorithm for multinomial logit models and can be plugged into the ChoiceModel. It gets a data array (of size number of observations $ \times$ number of alternatives $ \times$ number of variables) and an object upc_sequence as arguments. It uses the classes Probabilities and Utilities contained in upc_sequence for the maximum likelihood estimation. This assures that if bhhh_mnl_estimation is plugged into the estimate() method of ChoiceModel (Section 6.4.3), the model will be estimated by using the same code for computing utilities and probabilities as the run() method. The third argument of the run() method of this class is of type Resources and must contain an entry selected_choice which is a 0-1 matrix of size number of observations $ \times$ number of alternatives. For each agent, it contains a 1 on a position of the chosen alternative, otherwise 0s. Note that ChoiceModel prepares and passes this matrix automatically.

estimate_linear_regression performs a parameters estimation via the least squares method. It gets a data array (of size number of observations $ \times$ number of variables), an instance of class Regression (not used in this module) and an object Resources as arguments. The last argument must contain an entry outcome which is a 1-d array of an outcome for each observation. This class can be plugged into the RegressionModel which takes care of all arguments.

The estimation modules return a dictionary, with entries estimators and standard_errors. These contain arrays of estimated coefficients and their standard errors, respectively. An entry other_measures is a dictionary which should contain additional measures of the estimates, i.e. their values should be arrays of the same size as estimators. The two estimation modules in opus_core return here one entry, namely the t_statistic. The last entry in the dictionary returned by the modules, other_info, is a dictionary containing additional information about the estimation. Its values don't follow any restriction on type and size. Thus, these can be also single values, such as likelihood ratio test statistics, degrees of freedom, $ R^2$ etc.


next up previous index
Next: Sampler Class Up: Model Components Previous: Regression Class   Index
info (at) urbansim.org