Next: Initialization
Up: Working with Models
Previous: Location Choice Model
Index
Regression Model
Opus offers an infrastructure for estimation and simulation of a regression model
(see Section 7.4.4 for details).
Suppose our set of grid cells from the previous section has an attribute
``distance_to_cbd'' that contains information about the distance to the
central business district (cbd):
location cost distance_to_cbd
1 500 5
2 200 10
3 600 5
4 1000 1
5 100 20
6 2000 0
7 300 7
8 400 7
9 800 3
One can add the new attribute to the existing set of locations by:
>>> locations.add_primary_attribute(name="distance_to_cbd",
data=[5,10,5,1,20,0,7,7,3])
The cost of living in this dataset is highly correlated with
the distance to cbd and we can thus predict the cost using the regression model.
Subsections
Next: Initialization
Up: Working with Models
Previous: Location Choice Model
Index
info (at) urbansim.org