103
[Part 14] 1/103 Nonlinear Models with Spatial Data William Greene Stern School of Business, New York University Washington D.C. July 12, 2013

Nonlinear Models with Spatial Data

  • Upload
    peers

  • View
    26

  • Download
    3

Embed Size (px)

DESCRIPTION

Nonlinear Models with Spatial Data. William Greene Stern School of Business, New York University. Washington D.C. July 12, 2013. Y=1[New Plant Located in County]. Klier and McMillen: Clustering of Auto Supplier Plants in the United States. JBES, 2008. Outcome Models for Spatial Data. - PowerPoint PPT Presentation

Citation preview

Page 1: Nonlinear Models with Spatial Data

[Part 14] 1/103

Nonlinear Models with Spatial Data

William GreeneStern School of Business, New York

UniversityWashington D.C.

July 12, 2013

Page 2: Nonlinear Models with Spatial Data

[Part 14] 2/103

Y=1[New Plant Located in County]

Klier and McMillen: Clustering of Auto Supplier Plants in the United States. JBES, 2008

Page 3: Nonlinear Models with Spatial Data

[Part 14] 3/103

Outcome Models for Spatial Data Spatial Regression Models Estimation and Analysis Nonlinear Models and Spatial Regression Nonlinear Models: Specification, Estimation

· Discrete Choice: Binary, Ordered, Multinomial, Counts

· Sample Selection· Stochastic Frontier

Page 4: Nonlinear Models with Spatial Data

[Part 14] 4/103

Spatial Autocorrelation

ii

( ) ( ) , N observations on a spatially arranged variable

contiguity matrix; 0 spatial autocorrelation parameter, -1 < < 1.

E[ ]= Var[ ]=

x i W x i ε

W W

ε 0, ε

2

1

2 -1( ) [ ]E[ ]= Var[ ]= [( ) ( )]

ISpatial "moving average" formx i I W ε x i, x I W I W

Page 5: Nonlinear Models with Spatial Data

[Part 14] 5/103

Spatial Autocorrelation in Regression

ii2

2

11 1

12

( ) . w 0.E[ | ]= Var[ | ]=E[ | ]=Var[ | ] ( )( )

ˆ ( )( ) ( )( )1 ˆ ˆ( )( )ˆ N

ˆ The subject

y Xβ I - W εε X 0, ε X I y X Xβ

y X = I - W I - WA Generalized Regression Model

β X I - W I - W X X I - W I - W y

y- Xβ I - W I - W y- Xβ

of much research

Page 6: Nonlinear Models with Spatial Data

[Part 14] 6/103

Bell and Bockstael (2000) Spatial Autocorrelation in Real Estate Sales

Page 7: Nonlinear Models with Spatial Data

[Part 14] 7/103

Agreed Upon Objective: Practical Obstacles

• Problem: Maximize logL involving sparse (I-W)• Inaccuracies in determinant and inverse• Kelejian and Prucha (1999) moment based estimator of • Followed by FGLS

Page 8: Nonlinear Models with Spatial Data

[Part 14] 8/103

Spatial Autoregression in a Linear Model

2

1

1 1

1

2 -1

+ . E[ | ] Var[ | ]=

[ ] ( ) [ ] [ ]E[ | ] [ ]Var[ | ] [( ) ( )]Estimators: Various f

y = Wy Xβ εε X = 0, ε X I

y = I W Xβ ε= I W Xβ I W ε

y X = I W Xβy X = I W I W

orms of generalized least squares. Maximum likelihood | ~ Normal[ , ]ε 0

Page 9: Nonlinear Models with Spatial Data

[Part 14] 9/103

Complications of the Generalized Regression Model

Potentially very large N – GIS data on agriculture plots Estimation of . There is no natural residual based estimator Complicated covariance structures – no simple transformations

Page 10: Nonlinear Models with Spatial Data

[Part 14] 10/103

Panel Data Application

it it i it

t t t

E.g., N countries, T periodsy c

= N observations at time t.Similar assumptions Candidate for SUR or Spatial Autocorrelation model.

x βε Wε v

Page 11: Nonlinear Models with Spatial Data

[Part 14] 11/103

Spatial Autocorrelation in a Panel

Page 12: Nonlinear Models with Spatial Data

[Part 14] 12/103

Analytical Environment

Generalized linear regression Complicated disturbance covariance matrix Estimation platform: Generalized least squares or maximum likelihood (normality) Central problem, estimation of

Page 13: Nonlinear Models with Spatial Data

[Part 14] 13/103

Page 14: Nonlinear Models with Spatial Data

[Part 14] 14/103

Outcomes in Nonlinear Settings Land use intensity in Austin, Texas – Discrete Ordered Intensity = 1,2,3,4 Land Usage Types in France, 1,2,3 – Discrete Unordered Oak Tree Regeneration in Pennsylvania – Count Number = 0,1,2,… (Many zeros) Teenagers in the Bay area: physically active = 1 or physically inactive = 0 – Binary Pedestrian Injury Counts in Manhattan – Count Efficiency of Farms in West-Central Brazil – Nonlinear Model (Stochastic frontier) Catch by Alaska trawlers in a nonrandom sample

Page 15: Nonlinear Models with Spatial Data

[Part 14] 15/103

Nonlinear Outcomes Discrete revelation of choice indicates latent underlying preferences

Binary choice between two alternatives Unordered choice among multiple choices Ordered choice revealing underlying strength of preferences

Counts of events Stochastic frontier and efficiency Nonrandom sample selection

Page 16: Nonlinear Models with Spatial Data

[Part 14] 16/103

Modeling Discrete Outcomes

“Dependent Variable” typically labels an outcome· No quantitative meaning· Conditional relationship to covariates

No “regression” relationship in most cases. · Models are often not conditional means. · The “model” is usually a probability Nonlinear models – usually not estimated by any type of linear least squares

Page 17: Nonlinear Models with Spatial Data

[Part 14] 17/103

Nonlinear Spatial Modeling

Discrete outcome yit = 0, 1, …, J for some finite or infinite (count case) J.

· i = 1,…,n· t = 1,…,T

Covariates xit

Conditional Probability (yit = j) = a function of xit.

Page 18: Nonlinear Models with Spatial Data

[Part 14] 18/103

Page 19: Nonlinear Models with Spatial Data

[Part 14] 19/103

Issues in Spatial Discrete Choice• A series of Issues

Spatial dependence between alternatives: Nested logit Spatial dependence in the LPM: Solves some practical problems. A bad model Spatial probit and logit: Probit is generally more amenable to modeling Statistical mechanics: Social interactions – not practical Autologistic model: Spatial dependency between outcomes or utillities. See below Variants of autologistic: The model based on observed outcomes is incoherent (“selfcontradictory”) Endogenous spatial weights Spatial heterogeneity: Fixed and random effects. Not practical.

• The model discussed below

Page 20: Nonlinear Models with Spatial Data

[Part 14] 20/103

Two Platforms

Random Utility for Preference Models Outcome reveals underlying utility

· Binary: u* = ’x y = 1 if u* > 0· Ordered: u* = ’x y = j if j-1 < u* < j

· Unordered: u*(j) = ’xj , y = j if u*(j) > u*(k) Nonlinear Regression for Count Models Outcome is governed by a nonlinear regression

· E[y|x] = g(,x)

Page 21: Nonlinear Models with Spatial Data

[Part 14] 21/103

Maximum Likelihood EstimationCross Section Case: Binary Outcome

· ·

·

Random Utility: y* = + Observed Outcome: y = 1 if y* > 0,

0 if y* 0. Probabilities: P(y=1|x) = Prob(y* > 0| )

x

x

·

= Prob( > - ) P(y=0|x) = Prob(y* 0| ) = Prob( - ) Likelihood for the sample = joint probability

xxx

·

ni ii=1

ni ii=1

= Prob(y=y| ) Log Likelihood = logProb(y=y| )

x

x

Page 22: Nonlinear Models with Spatial Data

[Part 14] 22/103

Cross Section Case: n observations

1 1 1 1 1 1

2 2 2 2 2 2

n n n n n n

y =j | or > Prob( or > )y =j | or > Prob( or > )Prob Prob = ... ... ...y =j | or > Prob( or > )

We operate on the mar

x x xx x x

x x x

·

·

ni ii=1

2

ginal probabilities of n observations LogL( | )= logF 2y 1

1 Probit F(t) = (t) exp( t / 2)dt (t)dt2

exp(t) Logit F(t) = (t) = 1 exp(t)

t t

X,y x

Page 23: Nonlinear Models with Spatial Data

[Part 14] 23/103

How to Induce Correlation

Joint distribution of multiple observations

Correlation of unobserved heterogeneity

Correlation of latent utility

Page 24: Nonlinear Models with Spatial Data

[Part 14] 24/103

Bivariate Counts Intervening variable approach Y1 = X1 + Z, Y2 = Y2 + Z; All 3 Poisson distributed Only allows positive correlation. Limited to two outcomes Bivariate conditional means 1 = exp(x1 + 1), 2 = exp(x2 + 2), Cor(1,2)=

|Cor(y1,y2)| << || (Due to residual variation) Copula functions – Useful for bivariate. Less so if > 2.

Page 25: Nonlinear Models with Spatial Data

[Part 14] 25/103

Spatially Correlated ObservationsCorrelation Based on Unobservables

1 1 1 1 1

2 2 2 2 2

n n n n n

y u u 0y u u 0 ~ f ,... ... ... ...y u u 0

In the cross section case, = . = the usual spatial weight matrix .

xx I I I

x

W W W

WW 0 Now, it is a full matrix.

The joint probably is a single n fold integral.

Page 26: Nonlinear Models with Spatial Data

[Part 14] 26/103

Spatially Correlated ObservationsCorrelated Utilities

* *1 1 1 11 1

* * 12 2 2 22 2

* *n n

y yy y

... ...... ...y y

In the cross section case, = the usual spatial weight matrix .

n n n n

x xx x

x x

W I W

WW = . Now, it is a full

matrix. The joint probably is a single n fold integral.0

Page 27: Nonlinear Models with Spatial Data

[Part 14] 27/103

Log Likelihood

In the unrestricted spatial case, the log likelihood is one term, LogL = log Prob(y1|x1, y2|x2, … ,yn|xn) In the discrete choice case, the probability will be an n fold integral, usually for a normal distribution.

Page 28: Nonlinear Models with Spatial Data

[Part 14] 28/103

*1 11 1

*2 22 2

*n n

*i i

1 12 2 13 3 1 1

2 21 1 23 3 2 2

y yy y

...... ...y y

y 1[y 0]y 1[ (w y w y ...) 0]y 1[ (w y w y ...) 0] etc.

The model based on observa

n n

xx

x

xx

W

bles is more reasonable.There is no reduced form unless is lower triangular.This model is not identified. (It is "incoherent.")

W

A Theoretical Behavioral Conflict

Page 29: Nonlinear Models with Spatial Data

[Part 14] 29/103

See Maddala (1983)

From Klier and McMillen (2012)

Page 30: Nonlinear Models with Spatial Data

[Part 14] 30/103

LogL for an Unrestricted BC Model

n 1

1 1 1 2 12 1 n 1n 1

2 2 1 2 21 2 n 2n 2n

n n n 1 n1 n 2 n2 n

i i

LogL( | )=q 1 q q w ... q q wq q q w 1 ... q q wlog ... d... ... ... ... ... ...q q q w q q w ... 1

q 1 if y = 0 and +1 if

x x

X,y

···

i i y = 1 = 2y 1 One huge observation - n dimensional normal integral. Not feasible for any reasonable sample size. Even if computable, provides no device for estimating

sampling standard errors.

Page 31: Nonlinear Models with Spatial Data

[Part 14] 31/103

Solution Approaches for Binary Choice

Distinguish between private and social shocks and use pseudo-ML

Approximate the joint density and use GMM with the EM algorithm Parameterize the spatial correlation and use copula methods Define neighborhoods – make W a sparse matrix and use pseudo-ML Others …

Page 32: Nonlinear Models with Spatial Data

[Part 14] 32/103

Page 33: Nonlinear Models with Spatial Data

[Part 14] 33/103

*i i i ij jj i

* ii i i

i ij jj i

*i i i

* i ii i i

ii

2 2 2i ijj i

Spatial autocorrelation in the heterogeneity

y w

y 1[y 0], Prob y 1Var w

or

y u

y 1[y 0]Prob y 1Var u

1 w

x

x

x

x x

Page 34: Nonlinear Models with Spatial Data

[Part 14] 34/103

n i ii 1

i

1MLE

Heteroscedastic ProbitEstimation and Inference

(2y -1)MLE: logL = log

n ˆ ( ) ( ) =Score vector

implies the algorithm, Newton's Method.EM alg

x

H S S

orithm essentially replaces with during iterations.(Slightly more involved for the heteroscedasticity. LHS variablein the EM iterations is the score vector.)To compute the asymptotic covariance

H X X

, we need Var[ ( )]Observations are (spatially) correlated! How to compute it?

S

Page 35: Nonlinear Models with Spatial Data

[Part 14] 35/103

GMMPinske, J. and Slade, M., (1998) “Contracting in Space: An Application of Spatial Statistics to Discrete Choice Models,” Journal of Econometrics, 85, 1, 125-154.Pinkse, J. , Slade, M. and Shen, L (2006) “Dynamic Spatial Discrete Choice Using One Step GMM: An Application to Mine Operating Decisions”, Spatial Economic Analysis, 1: 1, 53 — 99.

1

i

*= + , = + = [ - ] = uCross section case: =0Probit Model: FOC for estimation of is based on the

ˆ generalized residuals u

y W uI W u

A

X ε

x xx x

i i i

n i i iii=1

i i

= y E[ | y ](y ( )) ( ) = ( )[1 ( )]

Spatially autocorrelated case: Moment equations are stillvalid. Complication is computing the variance of the

x 0

momentequations, which requires some approximations.

Page 36: Nonlinear Models with Spatial Data

[Part 14] 36/103

GMM Approach Spatial autocorrelation induces heteroscedasticity that is a function of Moment equations include the heteroscedasticity and an additional instrumental variable for identifying . LM test of = 0 is carried out under the null hypothesis that = 0. Application: Contract type in pricing for 118 Vancouver service stations.

Page 37: Nonlinear Models with Spatial Data

[Part 14] 37/103

GMM

1*= + , = +

= [ - ] = uAutocorrelated Case: 0Probit Model: FOC for estimation of is based on the

ˆ generalized residuals u

y W uI W u

A

X ε

x x

x x

i i i

i ii

n ii iiii=1

i i

ii ii

= y E[ | y ]

y a ( ) a ( ) = 1a ( ) a ( )

z 0

Requires at least K+1 instrumental variables.

Page 38: Nonlinear Models with Spatial Data

[Part 14] 38/103

Extension to Dynamic Choice Model

Pinske, Slade, Shen (2006)

Page 39: Nonlinear Models with Spatial Data

[Part 14] 39/103

Page 40: Nonlinear Models with Spatial Data

[Part 14] 40/103

Page 41: Nonlinear Models with Spatial Data

[Part 14] 41/103

1

1* 2ii i

*ii i i

i

i i i

* = + , = + = ( - )

[ ], Var[ ] = ( - ) ( - ) ,

Prob(y 1)

Generalized residual u dInstruments

Cri

Spatial Logit Model

Iterated 2SLS (GMM)

y X e e We I W

d = 1y 0 e I W I W

x x

Z

1terion: q = ( , ) ( ) ( , ) u Z Z Z Z u

Page 42: Nonlinear Models with Spatial Data

[Part 14] 42/103

i i i

*i i i

i 1 1*i i

i i i ii2i

1 2 n

0

k k k

u d

(1 )u /

, =( - ) ( - )u / (1 ) A

[ , ,... ]

1. Logit estimation of =0, ˆˆ2. = ( - ), (

Algorithm

Iterated 2SLS (GMM)

xg A I W W I Wx

G g g g

G

u d G Z Z Z

β|

1

k

1

k k k k k

k k

k 1 k

)

ˆ ˆ ˆ3.

ˆ ˆ4. until is sufficiently small.

ˆ ˆ

Z G

G G G u

Page 43: Nonlinear Models with Spatial Data

[Part 14] 43/103

LM Test?

• If = 0, g = 0 because Aii = 0• At the initial logit values, g = 0• Thus, if = 0, g = 0• How to test = 0 using an LM style

test.• Same problem shows up in RE

models• But, here, is in the interior of the

parameter space!

Page 44: Nonlinear Models with Spatial Data

[Part 14] 44/103

Pseudo Maximum Likelihood

Maximize a likelihood function that approximates the true one Produces consistent estimators of parameters How to obtain standard errors? Asymptotic normality? Conditions for CLT are more difficult to establish.

Page 45: Nonlinear Models with Spatial Data

[Part 14] 45/103

Pseudo MLE

1

*i i i ijj i

* * 2 2i i i ij iij i

*= + , = + = [ - ] = uAutocorrelated Case: 0y Wy 1[y 0]. Var[y ] 1 W a ( )Implies a heteroscedastic probit.Pseud

y X W uI W u

A

x

θ ε

o MLE is based on the marginal densities.How to obtain the asymptotic covariance matrix?[See Wang, Iglesias, Wooldridge (2013)]

Page 46: Nonlinear Models with Spatial Data

[Part 14] 46/103

n i ii 1

i

1MLE

Estimation and Inference

(2y -1)MLE: logL = log

ˆ n ( ) ( ) =Score vector

implies the algorithm, Newton's Meth

Heteroscedastic Probit Approac

S

h

x

H S

od.

EM algorithm essentially replaces with during iterations.(Slightly more involved for the heteroscedasticity. LHS variablein the EM iterations is the score vector.)To compute the asymptotic c

H X X

ovariance, we need Var[ ( )]Observations are (spatially) correlated! How to compute it?

S

Page 47: Nonlinear Models with Spatial Data

[Part 14] 47/103

ˆ ˆ ˆ(data, ) (data, ) (data, )ˆ(data, ) Negative inverse of Hessianˆ(data, ) Covariance matrix of scores.

ˆHow to compute (data, )Terms are not independent in a spatial setting.

V A B AAB

B

Covariance Matrix for Pseudo MLE

Page 48: Nonlinear Models with Spatial Data

[Part 14] 48/103

‘Pseudo’ Maximum LikelihoodSmirnov, A., “Modeling Spatial Discrete Choice,” Regional Science and Urban Economics, 40,

2010.

1 1

1 tt 0

Spatial Autoregression in Utilities* * , 1( * ) for all n individuals* ( ) ( )

( ) ( ) assumed convergent = = + where

y Wy X y y 0y I W X I WI W W

AD A-D

nj 1 ij j

i ii

= diagonal elements*

Private Social Then

aProb[y 1 or 0| ] F (2y 1) , pd

Dy AX D A-D

Suppose individuals ignore the social "shocks."xX

robit or logit.

Page 49: Nonlinear Models with Spatial Data

[Part 14] 49/103

Pseudo Maximum Likelihood

Bases correlation in underlying utilities Assumes away the correlation in the reduced form Makes a behavioral assumption Requires inversion of (I-W) Computation of (I-W) is part of the optimization process - is estimated with . Does not require multidimensional integration (for a logit model, requires no integration)

Page 50: Nonlinear Models with Spatial Data

[Part 14] 50/103

Copula Method and ParameterizationBhat, C. and Sener, I., (2009) “A copula-based closed-form binary logit choice modelfor accommodating spatial correlation across observational units,” Journal of Geographical Systems, 11, 243–272

* *i i i i i

1 2 n

Basic Logit Modely , y 1[y 0] (as usual)Rather than specify a spatial weight matrix, we assume[ , ,..., ] have an n-variate distribution.

Sklar's Theorem represents the joint distribut

x

i

1 1 2 2 n n

ion in termsof the continuous marginal distributions, ( ) and a copulafunction C[u = ( ) ,u ( ) ,...,u ( ) | ]

Page 51: Nonlinear Models with Spatial Data

[Part 14] 51/103

Copula Representation

Page 52: Nonlinear Models with Spatial Data

[Part 14] 52/103

Model

Page 53: Nonlinear Models with Spatial Data

[Part 14] 53/103

Likelihood

Page 54: Nonlinear Models with Spatial Data

[Part 14] 54/103

Parameterization

Page 55: Nonlinear Models with Spatial Data

[Part 14] 55/103

Page 56: Nonlinear Models with Spatial Data

[Part 14] 56/103

Page 57: Nonlinear Models with Spatial Data

[Part 14] 57/103

Other Approaches

Case (1992): Define “regions” or neighborhoods. No correlation across regions. Produces essentially a panel data probit model. (Wang et al. (2013)) Beron and Vijverberg (2003): Brute force integration using GHK simulator in a probit model. Lesage: Bayesian - MCMC Others. See Bhat and Sener (2009).

Case A (1992) Neighborhood influence and technological change. Economics 22:491–508Beron KJ, Vijverberg WPM (2004) Probit in a spatial context: a monte carlo analysis. In: Anselin L, Florax RJGM, Rey SJ (eds) Advances in spatial econometrics: methodology, tools and applications. Springer, Berlin

Page 58: Nonlinear Models with Spatial Data

[Part 14] 58/103

Page 59: Nonlinear Models with Spatial Data

[Part 14] 59/103

See also Arbia, G., “Pairwise Likelihood Inference for Spatial Regressions Estimated on Very Large Data Sets” Manuscript, Catholic University del Sacro Cuore, Rome, 2012.

Page 60: Nonlinear Models with Spatial Data

[Part 14] 60/103

Partial MLE

*1 1 1 1j jj 1

* * 2 21 1 1 1j 11j 1

*2 2 2 2j jj 2

* * 2 22 2 2 2j 22j 2

* *1 2

Observation 1y Wy 1[y 0] Var[y ] 1 W a ( )

Observation 2y Wy 1[y 0] Var[y ] 1 W a ( )

Covariance of y and y = a

x

x

12( )

Page 61: Nonlinear Models with Spatial Data

[Part 14] 61/103

Bivariate Probit Pseudo MLE Consistent Asymptotically normal?

· Resembles time series case· Correlation need not fade with ‘distance’

Better than Pinske/Slade Univariate Probit? How to choose the pairings?

Page 62: Nonlinear Models with Spatial Data

[Part 14] 62/103

Page 63: Nonlinear Models with Spatial Data

[Part 14] 63/103

Lesage methods - MCMC

• SEM Model…• Bayesian MCMC• Data augmentation for unobserved y• Quirks about sampler for rho.

Page 64: Nonlinear Models with Spatial Data

[Part 14] 64/103

Ordered Probability Model

1

1 2

2 3

J -1 J

j-1

y* , we assume contains a constant termy 0 if y* 0y = 1 if 0 < y* y = 2 if < y* y = 3 if < y* ...y = J if < y* In general: y = j if < y*

βx x

j

-1 o J j-1 j,

, j = 0,1,...,J, 0, , j = 1,...,J

Page 65: Nonlinear Models with Spatial Data

[Part 14] 65/103

A Spatial Ordered Choice ModelWang, C. and Kockelman, K., (2009) Bayesian Inference for Ordered Response Data with a Dynamic Spatial Ordered Probit Model, Working Paper, Department of Civil and Environmental Engineering, Bucknell University.

* *1

* *1

Core Model: Cross Section y , y = j if y , Var[ ] 1Spatial Formulation: There are R regions. Within a region y u , y = j if y Spatial he

i i i i j i j i

ir ir i ir ir j ir j

βx

βx2

2

1 2 1

teroscedasticity: Var[ ]Spatial Autocorrelation Across Regions = + , ~ N[ , ] = ( - ) ~ N[ , {( - ) ( - )} ] The error distribution depends on 2 para

ir r

v

v

u Wu v v 0 Iu I W v 0 I W I W

2meters, and Estimation Approach: Gibbs Sampling; Markov Chain Monte CarloDynamics in latent utilities added as a final step: y*(t)=f[y*(t-1)].

v

Page 66: Nonlinear Models with Spatial Data

[Part 14] 66/103

An Ordered Probability Model

1

1 2

2 3

J -1 J

j-1

y* , we assume contains a constant termy 0 if y* 0y = 1 if 0 < y* y = 2 if < y* y = 3 if < y* ...y = J if < y* In general: y = j if < y*

βx x

j

-1 o J j-1 j,

, j = 0,1,...,J, 0, , j = 1,...,J

Page 67: Nonlinear Models with Spatial Data

[Part 14] 67/103

OCM for Land Use Intensity

Page 68: Nonlinear Models with Spatial Data

[Part 14] 68/103

OCM for Land Use Intensity

Page 69: Nonlinear Models with Spatial Data

[Part 14] 69/103

Estimated Dynamic OCM

Page 70: Nonlinear Models with Spatial Data

[Part 14] 70/103

Page 71: Nonlinear Models with Spatial Data

[Part 14] 71/103

Page 72: Nonlinear Models with Spatial Data

[Part 14] 72/103

Data Augmentation

Page 73: Nonlinear Models with Spatial Data

[Part 14] 73/103

Unordered Multinomial Choice

·

·j ij ij

Underlying Random Utility for Each Alternative U(i,j) = , i = individual, j = alternative Preference Revelation

Y(i) = j if and only if U(i,j) > U(i,k

Core Random Utility Model

x

·

1 J

1 J

) for all k j Model Frameworks

Multinomial Probit: [ ,..., ] ~N[0, ] Multinomial Logit: [ ,..., ] ~iid type 1 extreme value

Page 74: Nonlinear Models with Spatial Data

[Part 14] 74/103

Spatial Multinomial ProbitChakir, R. and Parent, O. (2009) “Determinants of land use changes: A spatial multinomial probit approach, Papers in Regional Science, 88, 2, 328-346.

jt ijt ik ijt

nij il lkl 1

Utility Functions, land parcel i, usage type j, date t U(i,j,t)=Spatial Correlation at Time t wModeling Framework: Normal / Multinomial ProbitEstimation: MCMC

x

- Gibbs Sampling

Page 75: Nonlinear Models with Spatial Data

[Part 14] 75/103

Page 76: Nonlinear Models with Spatial Data

[Part 14] 76/103

Page 77: Nonlinear Models with Spatial Data

[Part 14] 77/103

Page 78: Nonlinear Models with Spatial Data

[Part 14] 78/103

Random Parameters Models

Page 79: Nonlinear Models with Spatial Data

[Part 14] 79/103

Page 80: Nonlinear Models with Spatial Data

[Part 14] 80/103

Canonical Model

j

Poisson Regression y = 0,1,...

exp( ) Prob[y = j| ] = j! Conditional Mean = exp( )Signature Feature: EquidispersionUsual Alternative: Various forms of Negative BinomialSpatial E

x

x

i i i

ni im m im 1

ffect: Filtered through the mean = exp( + ) = w

x

Rathbun, S and Fei, L (2006) “A Spatial Zero-Inflated Poisson Regression Model for Oak Regeneration,” Environmental Ecology Statistics, 13, 2006, 409-426

Page 81: Nonlinear Models with Spatial Data

[Part 14] 81/103

Canonical Model for Counts

j

Poisson Regression y = 0,1,...

exp( ) Prob[y = j| ] = j! Conditional Mean = exp( )Signature Feature: EquidispersionUsual Alternative: Negative BinomialSpatial Effect: Filtered

x

x

i i i

ni im m im 1

through the mean = exp( + ) = w

x

Rathbun, S and Fei, L (2006) “A Spatial Zero-Inflated Poisson Regression Model for Oak Regeneration,” Environmental Ecology Statistics, 13, 2006, 409-426

Page 82: Nonlinear Models with Spatial Data

[Part 14] 82/103

Zero Inflation

There are two states· Always zero· Zero is one possible value, or 1,2,…

Prob(0) = Prob(state 1) + Prob(state 2) P(0|state 2)

Page 83: Nonlinear Models with Spatial Data

[Part 14] 83/103

Numbers of firms locating in Texas counties: Count data (Poisson)

Bicycle and pedestrian injuries in census tracts in Manhattan. (Count data and ordered outcomes)

A Blend of Ordered Choice and Count Data Models

Page 84: Nonlinear Models with Spatial Data

[Part 14] 84/103

Kriging

Page 85: Nonlinear Models with Spatial Data

[Part 14] 85/103

Page 86: Nonlinear Models with Spatial Data

[Part 14] 86/103

Page 87: Nonlinear Models with Spatial Data

[Part 14] 87/103

Spatial Autocorrelation in a Sample Selection Model

•Alaska Department of Fish and Game.•Pacific cod fishing eastern Bering Sea – grid of locations•Observation = ‘catch per unit effort’ in grid square•Data reported only if 4+ similar vessels fish in the region•1997 sample = 320 observations with 207 reported full data

Flores-Lagunes, A. and Schnier, K., “Sample selection and Spatial Dependence,” Journal of Applied Econometrics, 27, 2, 2012, pp. 173-204.

Page 88: Nonlinear Models with Spatial Data

[Part 14] 88/103

Spatial Autocorrelation in a Sample Selection Model

•LHS is catch per unit effort = CPUE•Site characteristics: MaxDepth, MinDepth, Biomass•Fleet characteristics:

· Catcher vessel (CV = 0/1)· Hook and line (HAL = 0/1)· Nonpelagic trawl gear (NPT = 0/1)· Large (at least 125 feet) (Large = 0/1)

Flores-Lagunes, A. and Schnier, K., “Sample selection and Spatial Dependence,” Journal of Applied Econometrics, 27, 2, 2012, pp. 173-204.

Page 89: Nonlinear Models with Spatial Data

[Part 14] 89/103

Spatial Autocorrelation in a Sample Selection Model*1 0 1 1 1 1 1

*2 0 2 2 2 2 2

21 1 12

122 12 2

*1 1

2

0~ , , (?? 1??)

0

Observation Mechanism

1 > 0 Probit Model

i i i i ij j ij i

i i i i ij j ij i

i

i

i i

i

y u u c u

y u u c u

N

y y

y

x

x

*2 1 if = 1, unobserved otherwise.i iy y

Page 90: Nonlinear Models with Spatial Data

[Part 14] 90/103

Spatial Autocorrelation in a Sample Selection Model

1 1 1

1 (1)1 1 1 2

2* (1) 2 (1)1 0 1 1 1 1 1 1

* (2) 2 (2 0 2 2 2 1 1

= Spatial weight matrix, 0.

[ ] = , likewise for

( ) , Var[ ] ( )

( ) , Var[ ] ( )

ii

N Ni i ij i i ijj j

Ni i ij i i ijj

y u

y u

u CuC C

u I C u

x

x

22)1

(1) (2)1 2 12 1

Cov[ , ] ( ) ( )

N

j

Ni i ij ijju u

Page 91: Nonlinear Models with Spatial Data

[Part 14] 91/103

Spatial Weights

2

1 ,

Euclidean distance

Band of 7 neighbors is usedRow standardized.

ijij

ij

cd

d

Page 92: Nonlinear Models with Spatial Data

[Part 14] 92/103

Two Step Estimation

0 122 (1)(1) (2)

1 11

2(1) 1 0 1

22 (1)1 1

Probit estimated by Pinske/Slade GMM

( )( ) ( )

( )

( )

Spatial regression with included IMR i

i

NNijij ij jj

iN

ijj i

Nijj

x

x

n second step(*) GMM procedure combines the two steps in one large estimation.

Page 93: Nonlinear Models with Spatial Data

[Part 14] 93/103

Page 94: Nonlinear Models with Spatial Data

[Part 14] 94/103

Spatial Stochastic FrontierProduction function modely = + εy = + v - uv unexplained noise = N[0,1]u = inefficiency > 0; efficiency = exp(-u)Object of estimation is u, not Not a linear regression. Fit by MLE or MCMC.

β x β x

Page 95: Nonlinear Models with Spatial Data

[Part 14] 95/103

247 Spanish Dairy Farms, 6 Years

Page 96: Nonlinear Models with Spatial Data

[Part 14] 96/103

A True Random Effects Model

ij

i ij ij ij

1 n

i k

y Output of farm j in municipality i in Center-West Brazil

y α + +v - u

(α ,...,α ) conditionally autoregressive based on neighborsα -α is smaller when municipalities i and k are closer tog

ij

β x

ether

Spatial Stochastic Frontier Models; Accounting for Unobserved Local Determinants of InefficiencySchmidt, Moriera, Helfand, Fonseca; Journal of Productivity Analysis, 2009.

Page 97: Nonlinear Models with Spatial Data

[Part 14] 97/103

Page 98: Nonlinear Models with Spatial Data

[Part 14] 98/103

Estimation by Maximum Likelihood

Page 99: Nonlinear Models with Spatial Data

[Part 14] 99/103

LeSage (2000) on Timing

“The Bayesian probit and tobit spatial autoregressive models described here have been applied to samples of 506 and 3,107 observations. The time required to produce estimates was around 350 seconds for the 506 observations sample and 900 seconds for the case infolving 3,107 observations. … (inexpensive Apple G3 computer running at 266 Mhz.)”

Page 100: Nonlinear Models with Spatial Data

[Part 14] 100/103

Time and Space (In Your Computer)

Page 101: Nonlinear Models with Spatial Data

[Part 14] 101/103

Page 102: Nonlinear Models with Spatial Data

[Part 14] 102/103

Thank you

Page 103: Nonlinear Models with Spatial Data

[Part 14] 103/103

••