>>> specification = EquationSpecification(
variables=array(["constant", "gridcell.distance_to_cbd"]),
coefficients=array(["constant", "dcbd_coef"]))
The estimation for predicting the cost of living is run by:
>> coef, other_results = rm.estimate(specification, dataset=locations,
outcome_attribute="gridcell.cost",
procedure="opus_core.estimate_linear_regression")
Estimating Regression Model (from opus_core.regression_model):
started on Mon Mar 19 21:14:33 2007
Estimate regression for submodel -2
Number of observations: 9
R-Squared: 0.536420010196
Adjusted R-Squared: 0.470194297367
Suggested |t-value| > 1.48230380737
-----------------------------------------------
Coeff_names estimate SE t-values
constant 1114.07 213.758 5.21183
dcbd_coef -71.1493 24.9995 -2.84603
===============================================
Estimating Regression Model (from opus_core.regression_model): completed...0.4 sec
The estimation procedure that is passed as an argument is expected to be
a child of EstimationProcedure (see Section 7.6.6) and have a
method run() that takes as arguments a
multidimensional data array and an instance of a class specified by the
argument regression_procedure in the model constructor. Thus, the
estimation procedure can use the same code that is used for simulation.
The resulting object of class Coefficients called coef can be stored or
directly used for predicting cost of other locations.
>>> coef.summary()
Coefficient object:
size: 2
names: ('const', 'distcbdcoef')
values:
(1114.073486328125, -71.149337768554688)
standard errors:
(213.75848388671875, 24.999521255493164)
t_statistic:
(5.2118330001831055, -2.8460280895233154)
submodels: (-2, -2)