Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework...

51
Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework with Spatial Data Cuicui Lu 1 Department of Economics Michigan State University E-mail: [email protected] Version: October 2012 Abstract In this paper, I study the estimation of nonlinear models of spatial processes. Generalized estimating equations (GEE) are applied to cross section data with spatial correlations. I use a partial quasi-maximum likelihood estimator (PQMLE) in the rst step and use a GEE approach in the second step. Given some regularity conditions and assumptions, the asymptotic distribution of the two-step estimator is derived in the framework of M-estimation. I use a probit model and a count data model to demonstrate the GEE procedure. Monte Carlo simulations show the e¢ ciency comparison of di/erent estimation methods for the two nonlinear models. The results show that correct modeling of the structure of the working correlation matrix is very important in nonlinear models, which is quite di/erent from the linear model. Key Words: Partial quasi-maximum likelihood estimation; Generalized estimating equa- tions; M-estimation; Two-step estimator; Spatial data; Probit model; Count data model JEL Codes: C13, C21, C35, C51 1 I would like to thank my advisor Professor Je/rey Wooldridge for his guidance. I would also like to thank Professor Peter Schmidt, Professor Timothy Vogelsang and Professor Chae Young Lee for their useful advice. An earlier version of this paper was given at the IVth conference of Spatial Econometrics Association, Toulouse, France, and the 2012 econometric society north America summer meeting, Chicago. I would like to thank the conference participants for their helpful comments. All errors are mine. 1

Transcript of Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework...

Page 1: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

Estimation of Nonlinear Models in a Quasi-MaximumLikelihood Framework with Spatial Data

Cuicui Lu1

Department of EconomicsMichigan State UniversityE-mail: [email protected]

Version: October 2012

Abstract

In this paper, I study the estimation of nonlinear models of spatial processes. Generalized

estimating equations (GEE) are applied to cross section data with spatial correlations. I

use a partial quasi-maximum likelihood estimator (PQMLE) in the �rst step and use a GEE

approach in the second step. Given some regularity conditions and assumptions, the asymptotic

distribution of the two-step estimator is derived in the framework of M-estimation. I use

a probit model and a count data model to demonstrate the GEE procedure. Monte Carlo

simulations show the e¢ ciency comparison of di¤erent estimation methods for the two nonlinear

models. The results show that correct modeling of the structure of the working correlation

matrix is very important in nonlinear models, which is quite di¤erent from the linear model.

Key Words: Partial quasi-maximum likelihood estimation; Generalized estimating equa-

tions; M-estimation; Two-step estimator; Spatial data; Probit model; Count data model

JEL Codes: C13, C21, C35, C51

1 I would like to thank my advisor Professor Je¤rey Wooldridge for his guidance. I would alsolike to thank Professor Peter Schmidt, Professor Timothy Vogelsang and Professor Chae Young Leefor their useful advice. An earlier version of this paper was given at the IVth conference of SpatialEconometrics Association, Toulouse, France, and the 2012 econometric society north America summermeeting, Chicago. I would like to thank the conference participants for their helpful comments. Allerrors are mine.

1

Page 2: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

1. INTRODUCTION

In a lot of empirical economic and social studies, there are discrete data examples

which exihbit spatial correlations due to the geographical locations of individuals or

agents of interest. For instance, the number of patents a �rm received shows correlation

with that received by other �rms near by. This may be due to a technology spillover

e¤ect or a common policy aiming at encouraging new technology in this place. Another

example is the neighborhood e¤ect. There is a causal e¤ect between the individual

decision whether to own stocks and the average stock market participation of the indi-

vidual�s community (Brown, Smith, & Weisbenner 2008). The �rst example is a count

data example and the second one is a binary response example. Both examples deals

with discrete data. Nonlinear models are suitable for the study on discrete variables.

Unfortunately there are not much literature on the estimation of nonlinear models with

discrete spatial data. Because of the spatial correlation, the discrete variables are not

independent. Both the nonlinearity and the correlation makes the estimation di¢ cult.

Maximum likelihood estimation (MLE) is a widely used method in estimating non-

linear models. In order to use MLE, one needs to specify the joint distributions of

spatial random variables. This includes correctly specifying the marginal and the con-

ditional distributions. However, given a spatial data set, the dependence structure is

generally unknown. If the joint distribution of the variables is misspeci�ed, MLE is

generally not consistent. Another estimation method is quasi-maximum likelihood es-

timation (QMLE). Using a density that belongs to a linear exponential family (LEF),

QMLE is consistent if we correctly specify the conditional mean with other features of

the density misspeci�ed. In a panel data case, pooled (partial) QMLE which ignores

serial correlation conditions is consistent under some regularity conditions (Wooldridge

2010).

2

Page 3: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

In their 2009 working paper, Wang, Iglesias and Wooldridge use a bivariate probit

partial MLE to improve the estimation e¢ ciency with a spatial probit model. Using

their approach we would need to correctly specify the marginal distribution of the bi-

nary response variable conditional on the covariates and distance measures2 . Since the

bivariate marginal distribution of a spatial multivariate normal distribution is bivariate

normal, one can derive the bivariate normal distribution under some distributional as-

sumptions. There are two problems with this paper by Wang, Iglesias and Wooldridge

(2009). First the computation is already hard for a bivariate distribution. The multi-

variate marginal distribution of a higher dimension is more computationally demand-

ing; second it also requires the correct speci�cation of the marginal bivariate normal

distribution to obtain consistency. In fact, we can have less restrictive distributional

assumptions than those required in bivariate partial MLE. Suppose we only specify the

mean and the working variances and covariances3 . Using QMLE in the LEF, we can

get consistent estimators. Even if the the variances and covariances are not correctly

speci�ed, we can still consistently estimate the mean parameters as well as the average

partial e¤ects, which are more interesting.

In the literature, the QMLE and GEE approach is used in panel data models to

get more e¢ cient estimators (Gourierous, Monfort, & Trongnon 1984). In this paper,

I will demonstrate how to use the QMLE and GEE approach in a spatial data setting

to get a consistent and more e¢ cient estimator. Generalized least squares (GLS) can

be used to improve the estimation e¢ ciency in a linear regression model even if the

variance covariance structure is misspeci�ed. Similarly, generalized estimating equations

2A sample of spatial data is collected with a set of geographical locations. Spatial dependenceis usually characterized by distances between observations. A distance measure is how one de�nesthe distances between observations. Physical distance or economic distance could be two options.Information about agents physical locations is commonly imprecise, eg. only zip code is known. Conleyand Molinari (2007) deals with the inference problem when there exist distance errors. In this paper Iassume there are no measurement errors in pairwise distances.

3The true variance covariance matrix is generally unknown. By specifying a working variance co-variance matrix, one can capture some of the correlation structure between observations.

3

Page 4: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

(GEE) or weighted multivariate nonlinear least squares (WMNLS) are used in nonlinear

panel data models and system of equations to obtain more e¢ cient conditional mean

parameters. Generally we expect that GEE can give more e¢ cient estimators compared

to PMLE, which uses only the marginal density to get the consistent estimators.

To use the QMLE in the spatial data setting, I �rst give a series of assumptions, based

on which M-estimators are consistent for the spatial processes. To derive the asymptotics

for the M-estimators we have to use a uniform law of large numbers (ULLN) and a

central limit theorem (CLT). These limit theorems are the fundamental building blocks

for the asymptotic theory of nonlinear spatial M-estimators, e.g. maximum likelihood

estimators (MLE) and generalized method of moments estimators (GMM) (Jenish and

Prucha, 2009). Conley (1999) makes an important contribution towards developing an

asymptotic theory of GMM estimators for spatial processes. He utilizes Bolthausen�s

(1982) CLT for stationary random �elds. Jenish and Prucha (2009) provide a ULLN

and a CLT for spatial data including nonstationary spatial processes. Using theorems

in Jenish and Prucha (2009), one can analyze more interesting economic phenomena.

For example, real estate prices usually shoot up as one moves from the periphery to the

center of a big city. While I will not discuss trending processes in this paper, Cressie

(1993) provides numerous examples of trending spatial processes.

In Section 2, the M-estimator framework under a spatial data context is established.

A series of assumptions are given based on Jenish and Prucha (2009) under which M-

estimators are consistent and have an asymptotic normal distribution. In Section 3, I

propose a two-step GEE estimator in a QMLE framework. In Section 4, the asymptotic

distributions for QMLE and GEE for spatial data are derived. In Section 5, consistent

variance covariance estimators are provided for the nonlinear estimators for spatial

data. In Section 6, we look in detail at a probit model with spatial correlation in the

error term of the latent variable and a count data model with a multiplicative spatial

4

Page 5: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

error term. Section 7 contains Monte Carlo simulation results which compare e¢ ciency

of di¤erent estimation methods for the two nonlinear models explored in the previous

section. Section 8 concludes. Section 10 is the appendix.

2. M-ESTIMATION

In this section, I will examine the M-estimation framework of nonlinear models

with spatial data. Unlike linear models, a very important feature of nonlinear models

is that estimators cannot be obtained in a closed form, which requires new tools for

asymptotic analysis: we need uniform law of large numbers (ULLN) and a central limit

theorem (CLT). The GEE procedure is a two-step M-estimation method within the

QMLE framework. The M-estimator with spatial data is proved to be consistent and

asymptotically normal under certain assumptions.

2.1. M-estimation

Assume that spatial processes reside on a regular lattice4 D in a Euclidean space,

Rd; d � 1.5 Let s denote a location in D. Suppose we have a sample of N observations.

Let DN � D contains the location information for this sample. Let si denote the

location of the observation i; i = 1; 2; :::; N: Let dij be the pairwise distance between

location si and location sj . That is, dij is the pairwise distance between observation i

and observation j. I �rst give some regularity conditions for the spatial processes I am

studying and then I give a general framework for M-estimators with spatial data.

Following Jenish and Prucha (2009) De�nition 1, I adopt the follwing de�nitions

of mixing for underlying random �eld. For U � DN and V � DN ; de�ne �-algebras

� (U) = � (xi; i 2 U) and � (V ) = � (xi; i 2 V ). jU j and jV j denote the cardinality of U4A lattice is a collection of spatial sites (locations) supplemented with neighborhood information

(Cressie 1993, p. 383).5A two-dimensional Euclidean space is called the Cartesian plane. Spatial processes can also reside

in a higher dimension of space, Rn; n > 2.

5

Page 6: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

and V . The two commonly used mixing conditions are �-mixing and �-mixing which

are introduced separately by Rosenblatt and Ibragimov. The �-mixing and �-mixing

conditions are: �N (U; V ) = sup (jP (u\v)� P (u)P (v)j ; u 2 U; v 2 V ) ; �N (U; V ) =

sup (jP (ujv)� P (u)j ; u 2 U; v 2 V; P (u) > 0) : De�ne a metric � (i; j) = max1�l�d jilj ;

where il denotes the l-th component of i. The mixing conditions for the underlying

random �elds are de�ned as follows:

�k;l;N (r) = sup (�N (U; V ) ; jU j � k; jV j � l; � (U; V ) � r),

�k;l;N (r) = sup (�N (U; V ) ; jU j � k; jV j � l; � (U; V ) � r) ; with k; l; r;N natural num-

bers. Further let ��k;l;N (r) = supN�k;l;N (r) and ��k;l;N (r) = sup

N�k;l;N (r) :

Let fwNg = f(xi; yi)g ; i = 1; 2; :::; N . (xi; yi) is the observation obtained at location

si: xi is a row vector of independent variables and yi is a scalar dependent variable.

� 2 � is a P � 1 parameter vector, and �0 is the true parameter value. Let � be a

general notation for the parameter vector. An objective function QN depends on a

sample of realizations of variables wN ; location information DN , parameter � and the

sample size N: An M-estimator of �0 is given by minimizing the objective function QN

as follows,

�N = argmin�2�

QN (wN ;DN ;�) : (1)

In particular, I will address the case when QN (wN ;DN ;�) can be expressed as a

sample average. An example of this type of M-estimator is partial (pooled) maximum

likelihood (PMLE) estimator. The objective function can be written as

QN (wN ;DN ;�) =1

N

NXi=1

qi (wi;DN ;�) ; (2)

where qi (wi;DN ;�) ; i = 1; 2; :::; N; is some real valued function de�ned on �. wi

is the observed data obtained at location si. DN contains the location information

of wi and other observations. For simplicity reason, let qi (�) � qi (wi;DN ;�) and

6

Page 7: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

QN (�) � QN (wN ;DN ;�). I will drop w and D unless they are needed for clarity.

Suppose that in a parametric model, conditional mean is correctly speci�ed. Let

E(yijxi;DN ) = mi (xi;DN ;�0) ; i = 1; 2; :::; N; be a correctly speci�ed mean function

along with a LEF density fi (yijxi;�). For example, in a nonlinear regression model,

the objective function for the nonlinear weighted least squares (NWLS) estimator is

1N

PNi=1

n[yi �mi (xi;�)]

2=vi

o; where vi is the variance of the error term (usually

based on the LEF density), while for the partial maximum likelihood estimation the

objective function is 1N

PNi=1 log fi (yijxi;DN ;�), with E(yijxi;DN ) = mi (xi;DN ;�0) :

For the M-estimator to be consistent, we need a uniform law of large numbers

(ULLN). To derive the ULLN, we need the following assumptions.

Assumption 1: The pairwise distances are �nite and lower bounded by some " > 0.

I employ increasing domain asymptotics. That is, the sample size grows as the sampling

region expands.

Assumption 2: xi; yi are uniformly bounded variables.

Assumption 3: � is a compact subset on Rp:

Assumption 4 (Pointwise Convergence): For each � 2 �, QN (�) � �QN (�)

= op (1) ; where �QN (�) = E (QN (�)) = 1N

PNi=1 E (qi (�)) ; and limN!1 �QN (�) = �Q:

Assumption 5: QN (�) is stochastically equicontinuous. Let (�;v) be a metric

space. Let B��0; �

�be the open ball

�� 2 � :v

��;�0

�< �: QN (�) is stochastically

equicontinuous in the sense that, for every " > 0;

lim supN!1 P

sup

�;�02�;v(�;�0)

��QN (�)�QN ��0��� > "!! 0 as � ! 0 :

Assumption 6: �QN (�) is also stochastically equicontinuous on �. The de�nition

is similar to the statement above for QN (�) to be stachostically equicontinuous.

Assumption 7: �Q attains unique global minimization at �0 2 �.

7

Page 8: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

Assumption 8: No perfect multicollinearity in x: For exponential and logistic re-

gression functions, the objective function is a function of a linear function of independent

variables. Multicollinearity should be ruled out in order to identify the model.

Assumption 4 provides a pointwise law of large numbers. Assumption 7 and 8

provide the identi�cation conditions that make sure the model has unique solution to

the minimization problem.

Proposition 1. Under Assumptions 1-8, the M-estimator in equation (1) is

consistent, that is, �N !a:s: �0 as N !1: See proof in Appendix.

Following the above proposition, we can apply the ULLN to di¤erent nonlinear

estimators. The above M-estimator can be expressed utilizing groups of observations

(group notation). That is, we can divide the observations into groups according to

geographical properties or other economic or social relationships. Then we can write

the objective function as

QG (wG;DG;�) =1

G

GXi=1

qg (wg;DG;�) : (3)

Let qg (�) � qg (wg;DG;�), which is a real valued function of the gth group of obser-

vations, g = 1; 2; :::; G: wg contains the observations of the gth group. DG represents

the lattice with group information other than just locations. QG denotes the objective

function which indicate that the total number of groups is G, although the total num-

ber of observations is still N: Note that when the group size is equal to one, the group

notation is the same as the individual notation. I will use the group notation in the

rest of this paper.The above Assumptions 1-8 for the group notation are basically

the same as the individual notation (equation (1) and equation (2)) except that the

subscript i changes into g. Let L be the number of observations in each group, then the

8

Page 9: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

total number of groups G = N=L.

�G = argmin�2�

QG (wG;DG;�) (4)

Proposition 2. Follow Proposition 1, the groupwise M-estimator in equation (4)

is consistent, that is, �G !a:s: �0 as G!1: See proof in Appendix.

2.2. Two-step Estimation

In some situtations, we have a preliminary estimator. For example, from a partial

QMLE estimator, we can get a preliminary consistent estimator. After that we can get

an estimated working covariance matrix as weight to get a more e¢ cient estimator. A

two-step M-estimator �G of �0 solves the problem

�G = argmin�2�

QG (wG;DG;�; ) ; (5)

QG (wG;DG;�; ) =1

G

GXg=1

qg (wg;DG;�; ) ;

where is a preliminary estimator based on the sample fwg : g = 1; 2; :::; Gg which

exhibits spatial correlations. p lim = �; where � is some element in the parameter

space �: I will discuss a speci�c example of the two-step M-estimator in the next section,

the PMLE and GEE method.

Assumption 9: �QG (�; �) attains unique global minimization at �0 2 �, where

�QG (�; �) = 1

G

PGg=1 E [qg (wg;DG;�;

�)] ; That is �QG (�0; �) < �QG (�; �) ; for all

� 2 �;� 6= �0:

Assumption 9 provides necessary identi�cation condition for the two-step M-estimator.

If qg (wi;�0; ) is stachastically equicontinuous over�� �, then a ULLN applies. Along

with identi�cation, this result can be shown to imply consistency of �G for �0: The

9

Page 10: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

consisitency argument is the same as Proposition 1.

3. TWO-STEP ESTIMATOR: QMLE AND GEE

Due to the complexity of the joint distribution of spatial random processes, econo-

metricians have developed a variaty of ways to reduce the computational burden. One

way is to specify the partial conditional distribution, and maximize the summand of log

likelihoods for each observation. The parameters can be consistently estimated if the

partial log likelihood function satis�es the assumptions for consistency of M-estimation.

A consistent variance estimator should be provided for valid inference6 . Moreover, one

can divide data into di¤erent groups, and specify the marginal distribution for each

group to get a more e¢ cient estimator (Wang, Iglesias, & Wooldridge 2009). However,

this approach requires correctly speci�ed marginal distributions, and when we increase

the group size, the joint distribution for each group of variables becomes more and

more di¢ cult to compute. In this section, I propose a two-step estimator in a QMLE

framework. The �rst step is a pooled QMLE procedure and the second step is a GEE

procedure. Only the correct conditional mean and a density function in the LEF need

to be speci�ed.

The partial (pooled) QMLE method requires correctly speci�ed conditional mean

functions, E(yijxi) = mi (xi;�0) ; i = 1; 2; :::; N; along with a LEF density fi (yijxi;�).

Then one proceeds with minimizing the sum of log individual likelihoods ignoring any

spatial dependence. Note that, the true log likelihood cannot be written by the sum

of the individual likelihoods. PQMLE is an approximation of the true MLE. However,

under certain conditions, PQMLE delivers consistent estimators with computation ease.

The the partial quasi-log likelihood is

6 Ignoring dependence in the estimation of parameters will result in wrong inferences if the variancesare calculated in the way that independence is assumed. Dependence should be accounted for to theextent of how much one ignores it in the estimation.

10

Page 11: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

LN (�) =1

N

NXi=1

log fi (yijxi;DN ;�) : (6)

The partial QMLE is found by solving the score dunction,

SN����=

NXi=1

si����= 0: (7)

One characterization of QMLE in LEF is that the individual score function has the

following form:

si (�) = rmi (xi;DN ;�)0[yi �mi (xi;DN ;�)] =v (mi (xi;DN ;�)) ; (8)

where rmi (xi;DN ;�) is the 1�P gradient of the mean function and v (mi (xi;DN ;�))

is the variance function associated with the chosen LEF density. For Bernoulli,

v (mi (xi;DN ;�)) = mi (xi;DN ;�) (1�mi (xi;DN ;�)) ;

and for Poisson,

v (mi (xi;DN ;�)) = mi (xi;DN ;�) :

E(si (�) jxi;DN ) = 0 if E(yijxi;DN ) = mi (xi;DN ;�0), which implies Fisher consis-

tency.

The above gives a consistent estimator by Proposition 1. However, this estimator

is not likely to be the most e¢ cient estimator among the estimators that are based on

the same distributional assumptions, because it ignores the spatial correlations between

observations. If we can use some or all pairwise correlation information, we can possibly

improve the estimation e¢ ciency. A common way to make use of the pairwise infor-

mation is to divide observations into groups, and use spatial correlations within groups

11

Page 12: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

while ignore correlations between groups. In empirical studies, there exist some natural

groups of data, e.g., the technology spillover e¤ects within a certain state. Suppose we

know the groupwise distribution but not the full distribution of the whole data, we can

get a consistent estimator by using only groupwise information.

Let g be the number of groups, g = 1; 2; :::; G: The group size is the number of

observations divided by the number of groups, and it can vary from 1; 2; :::; to N: There

are two extreme cases of the group size. The �rst case is when the group size is 1,

the resulting estimator is the usual partial QMLE estimator, which means we ignore

all of the pairwise correlations. The second case is when the group size is N , which

means we are using all pairwise information. If the group size is not equal to one or

N , the estimation is actually a partial QMLE. By "partial", I mean that I do not use

full information, only the information within groups. Suppose we divide data into G

groups and assume that there are the same number of observations in each group. Let

L = N=G, which is �xed. The group numbers and the sample size both increase as

the sampling domain increases. That is, we get more observations by increasing the

space where we obtain a sample. For group g, Xg is an L � K matrix and yg is an

L � 1 vector, where g denotes the gth group, g = 1; 2; :::; G: Let X denote the N � P

covariate matrix. We can write the assumptions in terms of group notation. Those

assumptions are basically same, the di¤erence is the notation. Thus I will not readdress

the assumptions again.

Assumption 10: Conditional mean is correctly speci�ed for each group. E (ygjXg) =

mg (Xg;DG;�) � mg; g = 1; 2; :::; G: I will use mg for short and mg (�) to emphasise

certain parameters. When G = N; we get E(yijxi) = mi (xi;DN ;�0) :

12

Page 13: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

The QMLE estimator is given by setting the score function equal to 0.

GXg=1

sg

���= 0; (9)

where sg (�) is the score funtion for each group. And the group score sg (�) has the

following form,

sg (�) = rm0gW

�1g (yg �mg) : (10)

wherermg is the L�P gradient of the group mean function andWg is the LEF variance

covariance matrix for group g: Notice that Wg is not a diagonal matrix that only

contain the variances of each individual, but also contains the covariances of pairwise

individuals. It is because of this property that we can improve e¢ ciency by doing a so

called generalized estimating equations (GEE) approach. The GEE approach was �rst

extended to correlated data by Zeger and Liang (1986). In the spatial data context,

I propose that the generalized estimating equations (GEE) for the mean parameters,

which is given byGXg=1

rm0gW

�1g (yg �mg) = 0: (11)

In order to use GEE, we need to get a consistent estimator forWg which depends on

the pairwise distances and a spatial dependence parameter. Suppose Wg is a consistent

estimator for Wg: GEE is a "pseudo" weighted multivariate nonlinear least squares

(MWNLS), because GEE only use the groupwise information. The GEE estimator is

given by:

�GEE = argmin�

GXg=1

(yg �mg)0W�1

g (yg �mg) : (12)

As a special case, pooled QMLE is the same as the nonlinear weighted least squares

13

Page 14: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

estimator (NWLS):

~�NWLS = argmin�

NXi=1

[yi �mi (xi;DN ;�)]2=v (mi (xi;DN ;�)) : (13)

The following demonstrates how to �nd a consistent estimator forWg:We can write

Wg = Vg(Xg;�)1=2Rg (�;DG)Vg(Xg;�)

1=2:

The diagonal elements ofWg correspond to the variances of dependent variables drawn

from a density in LEF. The o¤-diagonal elements are the covariances that depend on

the spatial parameter and distances.

Vg(Xg;DG;�) =

0BBBBBBBBBB@

v1 � � � 0

0 v2...

.... . . 0

0 ::: 0 vL

1CCCCCCCCCCA; (14)

where the lth element on the diagonal is vl = Var(ygljXgl) in group g; ygl is the lth

element in the vector yg and Xgl is the lth row in Xg.

Let RN (�;DN ) be the N � N correlation matrix for the whole sample, and let

Rg (�;DG) be the L� L correlation matrix for the group g. A common assumption of

the ijth element of RN (�;DN ) is that

Rij = 1� (dij ; �) ; (dij ; h) =

8>><>>:0 if dij = 0;

c+ b [1� exp (�dij=�)] otherwise,(15)

where the vector of spatial parameters h = (c; b; �) ; c � 0; b � 0; � � 0; and c+ b � 2:7

7See Cressie (1993) p.61 for more examples.

14

Page 15: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

Set b = c = 1 without loss of generality. Then

Rij =

8>><>>:1 if dij = 0;

exp (�dij=�) otherwise.(16)

Another example would be

Rij =

8>><>>:1 if dij = 0;

�=dij otherwise.(17)

Although the above speci�cation does not represent all the possiblilities, it at least

provides a way of how to parameterize the spatial correlation, and provides the basis

for testing spatial correlation.

Let �� be the partial QMLE estimater. ui = yi � mi

�xi; ��

�; for i = 1; 2; :::; N ,

is the QMLE residual. �vi = v�mi

�xi;DN ; ��

��is the �tted variance of individual i

asociated with the chosen LEF density. Let ri = �ui=�vi be the standardized residual. Let

r = (r1; r2; :::; rN )0: Then rr0 is the sample correlation matrix. We can use a method

in Prentice (1988) to �nd a consistent estimator for �: Let e be a vector containing

N(N � 1)=2 di¤erent elements of the lower (or upper) triangle of rr0; excluding the

diagonal. Let z be the vector containing the elements in R corresponding to the same

entries of elements in rr0. We can get the parameter estimator � by solving:

� = argmin(e� z)0��1(e� z); (18)

where � is the working correlation matrix for e; the sample correlation vector. � is

a diagonal matrix with��21; �31; :::; �n1; �32; �42; :::; �N2; :::; �N;N�1

�as the elements on

the diagonal, which are the corresponding variances of element in e : If the variance

15

Page 16: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

covariance matrixW is correctly speci�ed, a model-based consistent variance estimator

of � is�PG

g=1rm0gW

�1g rmg

��1; where rmg = rmg

�Xg; �GEE

�: As an alternative,

the variance estimator of � that is robust to misspeci�cation of the variance covariance

matrix is

GXg=1

rm0gW

�1g rmg

!�1 GXg=1

GXh=1

rm0gW

�1g k (g; h) ugu

0hW

�1h rmh

!

GXg=1

rm0gW

�1g rmg

!�1; (19)

where k (g; h) is the kernel function depending on the distance between group g and h:

The GEE approach is summerized as follows:

First, �nd the partial QMLE estimator for the mean parameters and obtain the

residuals from PQMLE.

Second, use the �rst step estimator to get a �tted variance covariance matrix ac-

cording to the LEF density, and obtain the spatial correlation parameter using the

standardized residuals from the �rst step. After obtaining a working matrix, undertake

a multivariate weighted least squares procedure. This gives the GEE estimator.

Finally, we can get a consistent variance estimator for the mean paramter that is

robust to heteroskedasticity and spatial correlation. Further, we can obtain the average

partial e¤ect (APE).

4. ASYMPTOTIC DISTRIBUTION FOR PQMLE AND GEE

A central limit theorem is needed to develop the asymptotic distributions for M-

estimators. Bolthausen (1982) provides central limit theorem (CLT) for strictly sta-

tionary processes. However, in economic applications there are a lot of nonstationary

spatial processes in the sense that they are heterogenous; that is, the joint distribution

16

Page 17: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

of dependent variables varies with locations. There are also spatial processes which may

have asymptotically unbounded moments. However, in this paper, I will only discuss

uniformly bounded random variables.

From the above equation, we can take derivatives with respect to the parameter,

and get the scores for each group. Let sg (�) denote the P �1 vector of score for qg (�) :

The group score sg (�) and hessian Hg (�) have the following forms,

sg (�) = rm0g (�)W

�1g [yg �mg (�)] ; (20)

E (sg (�) jxg;DG) = 0:

By the assumption of correctly speci�ed conditional mean, the above condtion implies

Fisher consistency for QMLE for linear exponential family.

While

Hg (�) = @sg (�) =@�0 (21)

= �r�m0gW

�1g rmg + @r2�m0

gW�1g (yg �mg) ;

where r�mg � @mg=@� is the L � P gradient of the group mean function, @r2�mg �

@2mg=@�@�0is the L � P jacobian of the group mean function and Wg is the LEF

variance covariance matrix for group g: Taking the expected value of the score function

17

Page 18: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

over the distributions of w gives

E [Hg (�0)] = E fE [Hg (�0) jwg;DG]g (22)

= E��rm0

gW�1g rmg + E

�@r2�m0

gW�1g (yg �mg) jwg;DG

�= E

���rm0

gW�1g rmg

�+ @r2�m0

gW�1g [E (ygjwg;DG)�mg]

= E

��rm0

gW�1g rmg

�+ @r2�m0

gW�1g [mg �mg]

= E��rm0

gW�1g rmg

Notice that Wg is not a diagonal matrix that only contain the variances of each

individual, but also contains the covariances of pairwise individuals. It is because of

this property that we can improve e¢ ciency by doing a so called generalized estimating

equations (GEE) approach. The GEE approach was �rst extended to correlated data

by Zeger and Liang (1986). In the spatial data context, I propose that the generalized

estimating equations (GEE) for the mean parameters are given by

1

G

GXg=1

sg

���= 0; (23)

1

G

GXg=1

rm0g

���W�1

g

hyg �mg

���i= 0: (24)

Because each score is a function of spatial processes, they are correlated with each

other. The score function for the total sample is SG���= 1

G

PGg=1 sg

���= 0: The

score function can be expanded about �0 in a mean-value expansion:

SG

���=1

G

GXg=1

sg (�0) +1

G

GXg=1

Hg

������ � �0

�: (25)

where �� 2 � is between � and �0. Hg����is the P �P hession of the objective function

18

Page 19: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

qg (�) :

pG�� � �0

�=

"� 1G

GXg=1

Hg

����#�1 1p

G

GXg=1

sg (�0) : (26)

Assumption 11 (Uniform L2+� integrability): The elements in the scores are

uniformly bounded and have a limit expectation equal to zero. That is,

limk!1

supgEhjsglj2+� 1 (sgl > k)

i= 0; (27)

where 1 (�) is the indicator function and sg is the group score matix, which is P � L.

sgl is an element in the score matrix, and k is a constant.

Assumption 12: The second moment of the score function is positive and uniformly

bounded.

0 < limG!1

1

GVar

GXg=1

sg (�0)

!<1: (28)

Proposition 3. Under Assumptions 1-12,pG��� � �0

�) N

�0;A�1

0 B0A�10

�;

whereA0 = limG!1

n� 1G

PGg=1 E [Hg (�0)]

o, and B0 = limG!1Var

h1pG

PGg=1 sg (�0)

i:

E [Hg (�0)] has already been given in Equation (22). Varh1pG

PGg=1 sg (�0)

iis given

as follows,

Var

"1pG

GXg=1

sg (�0)

#= Var

(1pG

GXg=1

rm0g (�0)W

�1g [yg �mg (�0)]

)(29)

= Var

"1pG

GXg=1

rm0g (�0)W

�1g ug

#

=1

G

GXg=1

E�rm0

g (�0)W�1g ugu

0gW

�1g rmg (�0)

�+1

G

GXg=1

GXg 6=h

E�rm0

g (�0)W�1g uguhW

�1h rmh (�0)

�:

If we have a �rst step estimator, say ; p lim = �: By linear expansion, the score

19

Page 20: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

should be written as

SG

���

=1

G

GXg=1

sg (�0; ) + op (1) (30)

=1

G

GXg=1

sg (�0; �) + F0 ( � �) + op (1) ;

where

sg (�0; ) = rm0g (�)W

�1g [yg �mg (�)] = 0:

where W�1g is a function of ; F0 is a P � J matrix. J is the dimension of :

F0 = limg!11G

PGg=1 E [r sg (wg;�0; �)] : We can see rm0

g (�) and mg (�) do not

rely on : When we take derivatives with respect to , it only matters with W�1g .

r sg (wg;�0; �) is a linear combination of elements of [yg �mg (�)] : Since E[(yg �mg) j w;D]

= 0, E [r sg (wg;�0; �) jw;D] = 0: By law of iterated expectations, E [r sg (wg;�0; �)] =

0. Thus F0 = 0. Then we can write the score function as

SG

���=1

G

GXg=1

sg (�0; �) + op (1) ; (31)

and

SG

���=1

G

GXg=1

sg (�0; �) +

1

G

GXg=1

Hg

���;

���� � �0

�(32)

where �� 2 � is between � and �0. Hg����is the P �P hession of the objective function

qg (�) :

pG�� � �0

�=

"� 1G

GXg=1

Hg

���;

��#�1 1pG

GXg=1

sg (�0; �) : (33)

Thus the �rst step estimation will not a¤ect the asyptotic distribution of the second

step. � is a �xed number in the second step score function.

Proposition 4. Under Assumptions 1-12,pG�� � �0

�) N

�0;A�1

0 B0A�10

�;

20

Page 21: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

whereA0 = limG!1

n� 1G

PGg=1 E [Hg (�0;

�)]o, and B0 = limG!1Var

h1pG

PGg=1 sg (�0;

�)i:

See proof in Appendix.

5. VARIANCE COVARIANCE MATRIX ESTIMATOR

5.1. Parametric Variance Estimator

Assumption 13: Var (ug) = Var (ugjxg;DG) =Wg;

Cov (ug;uh) = Cov (ug;uhjxg;xh;DG) = Cgh:

Var

"1pG

GXg=1

sg (�0)

#=

1

G

GXg=1

E�rm0

g (�0)W�1g rmg (�0)

�(34)

+1

G

GXg=1

GXg 6=h

E�rm0

g (�0)W�1g CghW

�1h rmh (�0)

�:

Under Assumption 13, the asmptotic variance estimator for �G can be estimated

by

[Avar1���

=1

GA�1B1A

�1 (35)

=

GXg=1

rm0gW

�1g rmg

!�1 GXg=1

rm0gW

�1g CghW

�1h rm0

h

!

GXg=1

rm0gW

�1g rmg

!�1;

where

A =1

G

GXg=1

rm0gW

�1g rmg;

and

B1 =1

G

GXg=1

GXh=1

rm0gW

�1g CghW

�1h rm0

h:

21

Page 22: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

5.2. Nonparametric Variance Covariance Estimator

Assumption 13 is not always obtained. And most of times it can not be eas-

iliy known. Since AvarpG��G � �0

�= A�1

0 B0A�10 ; we can consistently estimate

AvarpG��G � �0

�by A�1B2A

�1. The asymptotic standard errors are obtained from

the matrix [Avar2��G

�= A�1B2A

�1=G. A robust nonparametric variance covariance

estimator is given as

[Avar2���

=1

GA�1B2A

�1 (36)

=

GXg=1

rm0gW

�1g rmg

!�1 GXg=1

GXh=1

k(dgh)rm0gW

�1g ugu

0hW

�1h rm0

h

!�rm0

gW�1g rmg

�;

where

A =1

G

GXg=1

rm0gW

�1g rmg;

and

B2 =1

G

GXg=1

GXh=1

k(dgh)rm0gW

�1g ugu

0hW

�1h rm0

h:

Proposition 5. Under Assumptions 1-13, [Avar2��G

�robust

! 1GA

�10 B0A

�10 .

See proof in Appendix

Although we do not need to make ajustment to the two-step QMLE estimator in

this paper, it is worth to mention that in lot of cases F0 6= 0; and we need to make

adjustment to the asymptotic variances.

pG�� � �0

�= A0

1pG

GXg=1

[�gg (�0; �)] + op (1) ;

22

Page 23: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

where

gg (�0; �) � sg (�0; �) + F0rg ( �) :

Let

D0 � limG!1

1

GE

"GXg=1

gg (�0; �)

GXh=1

gh (�0; �)0#;

the asyptotic distribution of � can be written as

pG�� � �0

�)d N

�0;A�1

0 D0A�10

�:

A robust estimator after adjustment is given as

[Avar3���

=1

GA�1DA

�1(37)

=

GXg=1

rm0gW

�1g rmg

!�1

GXg=1

GXh=1

k(dgh)�sg s

0h + sg r

0hF

0 + Frg s0h + Frg r

0hF

0�!

GXg=1

rm0gW

�1g rmg

!�1;

where

A =1

G

GXg=1

rm0gW

�1g rmg;

and

D=1

G

GXg=1

GXh=1

k(dgh)�sg s

0h + sg r

0hF

0 + Frg s0h + Frg r

0hF

0�: (38)

6. TWO EXAMPLES: SPATIAL PROBIT MODEL AND POISSON REGRESSION

23

Page 24: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

MODEL

The setup of nonlinear models with spatial data could be tricky. We need to incor-

porate the spatial correlated term in an appropriate way. In this section, I will use two

nonlinear models to demonstrate how we can incorporate the spatial correlated term

and use a GEE procedure. This could vary with di¤erent models. The �rst example is

a probit model, and the second one is a count data model.

6.1. Example 1. A Probit Model with Spatial Correlation in the Latent

Error

The probit model is one of the popular binary response models. The dependent

variable has conditional Bernoulli distribution. The dependent variable y takes on the

values zero and one, which indicates whether or not a certain event has occurred. For

example, y = 1 if a �rm adopts a new technology, and y = 0 otherwise. The value ot

the latent variable y� determines the outcome of y.

Assume the probit model is

yi = 1 [xi� + ei � 0] ; (39)

y�i = xi� + ei; (40)

The latent error e has a standard multivariate normal distribution, but the covari-

ances depend on pairwise distances DN , which is di¤erent from the usual multivariate

normal distribution.8

corr (ei; ej) = f (dij;�) ; (41)

where f (�)is a function increases in � and decreases in dij .8A multivariate normal distribution usually speci�es the mean vector and correlation matrix. The

correlations do not depend on the pairwise distance between two variables.

24

Page 25: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

We do not observe y�i ; we only observe yi: Let � (�) be the standard normal cumula-

tive density function (CDF), and � be the standard normal probability density function

(PDF). Assume that the mean function mi (xi;�) � E (yijxi;DN ) = � (xi�) is cor-

rectly speci�ed. Because of the nonlinearity of yi and nonobservability of the latent

variable y�i , Cov (yi; yj jxi;xj ;DN ) is hard to discover without more information on the

multivariate distribution. In order to proceed with GEE, we need to specify a working

matrix, which is possibly misspeci�ed.

The partial QMLE delivers a consistent �rst-step estimator for the mean parameters

as in Proposition 1. Using the bernoulli density function, the log likelihood function

for each observation is:

li (�)=yi log � (xi�)+ (1� yi) log [1� � (xi�)] : (42)

The partial QMLE solves:

�� = argmax�2�

LN (�) (43)

LN (�) =NXi=1

li (�) =NXi=1

yi log � (xi�) +NXi=1

(1� yi) log [1� � (xi�)] :

The score of the likelihood function for each individual is

si �� (xi�)x

0i [yi � � (xi�)]

� (xi�) [1� � (xi�)]: (44)

The expected Hessian9 for each observation is

E (Hijxi;DN ) = ��2 (xi�)x

0ixi

� (xi�) f1� � (xi�)g: (45)

9Unexpected Hessian can be derived. Because the score has the special form that contains yi ��(xi�), by taking the expectations conditional on xi and DN ; we can get a cleaner expression.

25

Page 26: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

Let AN be the sum of negative expected hessions AN=PN

i=1�2(xi�)x

0ixi

�(xi�)f1��(xi�)g , and

A0 = E(Hi) on the distribution of x: Let �ui = yi���xi��

�; i = 1; 2; :::; N be the resid-

uals. At this stage, a robust variance and covariance estimator for �� can be computed

as follows:

dVar ���� =

NXi=1

�2�xi��

�x0ixi

��xi��

� �1� �

�xi��

�!�1 (46)0@ NXi=1

NXj 6=i

k (dij)��xi��

���xj��

�x0i�ui�ujxj

� (xi�) [1� � (xi�)]

1A

NXi=1

�2�xi��

�x0ixi

��xi��

� �1� �

�xi��

�!�1 ;where k (dij) is the kernel weight function that depend on pairwise distances. This

partial QMLE and its robust variance covariance estimator provides a legitimate way

of the estimation of the spatial probit model.

The next is to �nd out how how the two-step estimator GEE works. The second

step is to construct the weighting matrix using the �rst-step estimators and residuals.

As the data can be divided into groups, the working matrix can be the weight for a

speci�c group. If the group size equals two, the working matrix is a two by two matrix.

We can write the working variance covariance matrix as Wg = Vg1=2Rg (�;DG) V

1=2g :

An estimator for the working variance matrix for each group is

Vg =

0BBBBBBBBBBBBBBBBBB@

�v1 0 0 � � � � � � 0

0 �v2 0 0

0 0. . .

. . ....

.... . . �vl

. . ....

.... . .

. . . 0

0 0 � � � � � � 0 �vL

1CCCCCCCCCCCCCCCCCCA

; (47)

26

Page 27: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

where

�vl = ��xl��

� �1� �

�xl��

��; l = 1; :::; L: (48)

Next we will �nd an estimator for the working correlation matrix for yi � � (xi�).

Suppose the structure of the true correlation matrix R is

Rij = Cij (dij ; �) ; (49)

where Cij (dij ; �) is a function that increases in � and decreases in dij : Note that � is

the spatial correlation parameter for the dependent variables, while � is for the latent

error. This two parameters are generally di¤erent. Let ri = �ui=p�vi , for i = 1; 2; :::; N;

be the standardized residuals. Cij equals the sample correlation of �ui=p�vi and �uj=

p�vj

. Let R � R�DG; �

�and Rg stand for the correlation matrix Rg

�Dg; �

�for the gth

group. The function Cij (dij ; �) is unknown, but we can choose a correlation function

to approximate it and use it in the estimation. For example, say C (dij ; �) = �dij

or exp��dij

�. By only using the correlations within groups, an estimator of � is

� = argminPG

g=1

PLi=1

PLj 6=i [rirj � Cij (dij ; �)]

2 for i < j:

The second step GEE estimator for � is

� = argmin�

GXg=1

(yg � � (xg�))0 W�1g (yg � � (xg�)) : (50)

If one believes the working correlation matrix is correlctly speci�ed, the nonrobust

variance estimator for � is

dVar1 ��� = GXg=1

D0gW

�1g Dg

!�1(51)

where Dg= @��xg�

�=@� =�

�xg�

�x0g: � is consistent even for misspeci�ed spatial

27

Page 28: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

correlation structure. The robust variance estimator to misspeci�cation of spatial cor-

relation is:

dVarR ��� =

GXg=1

D0gW

�1g Dg

!�1(52)

GXg=1

GXh=1

k(dgh)D0gW

�1g ugu

0hW

�1h Dh

!

GXg=1

D0gW

�1g Dg

!�1

where k(dgh) is a kernel function which depends on the distances between groups.

Alternative approach is to specify the speci�c distributions of the multivariate nor-

mal distribution of the latent error, and then �nd the estimator for the spatial correla-

tion parameter for the latent error within a MLE framework. For example, see Wang,

Iglesias and Wooldridge (2009).

6.2. Example 2. A Count Data Model with a Multiplicative Spatially

Correlated Term

A count variable is a variable that takes on nonnegative integer values. Many vari-

ables that we would like to explain in terms of covariates come as counts, such as the

number of times someone is arrested during a given year, and the number of patents

applied for by a �rm during a year. Count data examples with upper bound include

the number of children in a family who are high school graduates, in which the upper

bound is number of children in the family (Wooldridge 2010). A count data is ususally

characterized by a desity in LEF and a population mean. Here a Poisson distribution

is used. The conditional Poisson density is

f (yjx;D) = exp [� exp (x�)] [exp (x�)]y =y!; (53)

28

Page 29: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

where y! = 1 � 2 � ::: � (y � 1) � y and 0! = 1: D is the distance space.

Assume that the conditional mean function E(yijxi;DN ) = m (xi;�0) is correctly

speci�ed and model the spatial correlation in the conditional mean function. The ex-

pontial mean is most popular. Consider the count data model with an expontial mean:

E (yijxi; vi;DN ) = vi exp (xi�0) ; (54)

where vi is the multiplicative spatial error term. Let v equal (v1;v2; :::; vN )0: A count

data model with a multiplicative spatial error is characterized by the following assump-

tions:

(1) yijxi; vi;DN�Poisson [vi exp (xi�)]

(2) yi; yj are independent conditional on xi;xj ; vi; vj ;DN i 6= j

(3) vi is independent of xi, E(vi) = 1, Var (vi) = �2, and Cov(vi; vj) = �2 � c (dij) ;

where c (dij) is the spatial correlation depending on the distance between observation i

and j:

Under the above assumptions we can integrate out vi by using the law of iterated

expectations.

E (yijxi;DN ) = E (E (yijxi; vi;DN ) jxi;DN ) (55)

= E(vi exp (xi�0) jxi;DN )

= exp (xi�0) E (vijxi;DN )

= exp (xi�0) E (vi)

= exp (xi�0)

29

Page 30: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

And we can calculate the variances and covariances of y conditional on x:

Var (yijxi;DN ) = E [Var ((yijxi; vi;DN ) jxi;DN )] + Var [E ((yijxi; vi;DN ) jxi;DN )]

= E [vi exp (xi�0) jxi;DN ] + Var [vi exp (xi�0) jxi;DN ] (56)

= exp (xi�0) E (vijxi;DN ) + exp (2xi�0)Var (vijxi;DN )

= exp (xi�0) + exp (2xi�0) � �2

Cov (yi; yj jxi;xj ;DN ) = E [Cov ((yi; yj jxi;xj ; vi; vj ;DN ) jxi;xj ;DN )] (57)

+Covf[E (yijxi; vi;DN ) ; E (yj jxi; vi;DN )] jxi;xj ;DNg

= 0 + Cov (vi exp (xi�0) ; vj exp (xj�0) jxi;xj ;DN )

= exp (xi�0) exp (xj�0) Cov [vi; vj jxi;xj ;DN ]

= exp (xi�0) exp (xj�0) Cov (vi; vj)

= exp (xi�0) exp (xj�0) � �2 � c (dij)

The model can also be expressed as

E (yijxi; ei;DN ) = exp (xi� + ei) (58)

= exp (ei) exp (xi�0)

We can see that vi = exp (ei). We can model the spatial correlation between ei and

ej ; for i; j = 1; 2; :::; N . Let vector e denote (e1;e2; :::; eN )0: In this paper, only positive

correlations are considered for convenience. Negative correlations10 are possible and

10Bloom, schankerman and Reenen�s working paper (2012) in NBER identi�es negative product

30

Page 31: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

one can extend this mothod to it. For convenience, I assume e follows a multivariate

normal distribution, N(�;). Also I use this in the simultaion later. Then v will follow

a multivariate lognormal distribution. One could use other multivariate distributions

for e, and v will follow the corresponding multivarate distribution. Or one could use a

multivariate distribution for vi directly as long as the �rst two moments assumptions

for vi are satis�ed.

Although y follow a multivariate Poisson distribution, the above equation shows that

�0 can be consistently estimated by the partial Poisson maximum likelihood estimation.

The density function for yi is

fi (yijxi;DN ) = exp [� exp (xi�)] [exp (xi�)]yi =yi!; (59)

where yi! = 1 � 2 � ::: � (yi � 1) � yi and 0! = 1:

The log likelihood for each observation is

li (�) = � exp (xi�) + yixi� � log (yi!) ; (60)

and the score is

si (�) �@Li (�)

@�= x0i [yi � exp (xi�)] = x0iui; (61)

and the hessian is

Hi (�) = � exp (xi�)x0ixi: (62)

Let Ai � �E (Hi (�) jxi;DN ) = exp (xi�)x0ixi, and A0 � E [Ai] over the distribu-

tion of x and the spatial space D: Let B0 � E�si (�0) si (�0)

0�= E

�u2ix

0ixi�:

The partial QMLE gives a consistent estimator for the mean parameters, which

market rivalry e¤ect.

31

Page 32: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

solves:

�� = argmax�2�

L (�) =NXi=1

li (�) =NXi=1

yixi� �NXi=1

exp (xi�)�NXi=1

log (yi!) : (63)

A robust partial QMLE variance covariance estimator is

"NXi=1

exp�xi��

�x0ixi

#�1 NXi=1

NXj=1

k (dij)x0iuiujxj

"NXi=1

exp�xi��

�x0ixi

#�1; (64)

where k (i; j) is a kernel function depending on the distance between observations i and

j.

The partial QMLE does not make any use of the pairwise correlations. If we can

use them, we may improve e¢ ciency. The GEE approach is:

� = argmin�

GXg=1

[yg� exp (Xg�)]0W�1

g [yg� exp (Xg�)] : (65)

where Wg is an estimated weighting matrix. Again, like the probit model, Wg= V1=2

g RgV1=2g ;

where V is a diagonal matrix with the estimated variances on the diagonal, and R is

the estimated working correlation matrix. The most e¢ cient weighting matrix is the

true variance covariance matrix of y � exp (X�).

There are two pivotal parameters that we do not know in the estimation, �2 and �:

We could use the partial Poisson QMLE residuals to estimate the parameters. Let ��

be the partial Poisson regression estimator. Let �u2i =�yi � exp

�xi��

��2be the squared

residual. �2 can be estimated in the following way: �2 equals the coe¢ cient by regressing

�u2i � exp�xi��

�on exp

�2xi��

�: The situation to estimate � is a little bit complicated.

First, we do not know how �ij depends on � and dij . If we use the wrong structure,

we probably will get a wrong estimator for �. Suppose the correlation structure is

32

Page 33: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

c (dij) =�dij; then an estimtor for � is: � = coe¢ cient by regressing �ui�uj

exp(xi��) exp(xj��)

on �2

dij. However, this estimator sometimes su¤ers from the negative products of the

Poisson regression residuals, and the estimated parameter � is iased downward. Wg is

obtained by plugging �2 and � back in the variance covariance matrix. By minimizing

the above equation, we can get the GEE estimator.

If Assumption 13 holds, a nonrobust variance estimator for GEE is

dVar��� = GXg=1

D0gW

�1g Dg

!�1; (66)

where Dg = @ exp (Xg�) =@� = exp�Xg�

�X0g:

� is still consistent even for a misspeci�ed spatial correlation strucure when As-

sumption 13 does not hold. The robust variance estimator to misspeci�cation of

spatial correlation is:

dVar��� =

GXg=1

D0gW

�1g Dg

!�1(67)

GXg=1

GXh=1

k(dgh)D0gW

�1g ugu

0hW

�1h Dh

!

GXg=1

D0gW

�1g Dg

!�1

where k(dgh) is a kernel function depending on the distances between groups. The

distances could be the smallest distance between two observations belonging to di¤erent

groups.

7. MONTE CARLO SIMULATION

In this section, I want to do the Monte Carlo Simulation to investigate the e¢ ciency

gain of the GEE approach compared to the pooled QMLE. The simulation mechanism

33

Page 34: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

is described as follows:

(1) Each individual resides on a intersection of the square lattice. Thus the pairwise

distance can be calculated using the coordinates of each observation.

(2) According to pairwise distances, generate the pairwise correlations. In the sim-

ulation, there are two cases of pairwise correlations. One is that each observation is

correlated with all other observations; the other is that only observations in the same

group are correlated with each other. That is, assuming groupwise independence. The

group are demonstrated in the graph in the next subsection.

(3) After generated correlated data, the �rst step is to �nd the pooled QMLE esti-

mator. The second step is divide observations into groups and only use within group

information to estimate the correlation parameters. In the case of groupwise depen-

dence, although each pair of the data are correlated, we do not use pairwise correlations

between observations in di¤erent groups. In the case of groupwise dependence, this

method sounds natural. After estimation of the spatial correlation parameters, esti-

mate the mean parameters again using the GEE procedure.

7.1. Sampling Space

Graph 1 demonstrates the case when the sample size is 400. Thus, I create a 20�20

square lattice. Each observation resides on the intersections of the lattice. The locations

for the data are f(r; s) : r; s = 1; 2; :::20g. The distance dij between location i and j

is Euclidean distance. Suppse A(ai; aj) and B(bi; bj) are the two points on the lattice;

their distance dij isp(ai � bi)2 + (aj � bj)2. Then the spatial correlation is based on

a given parameter � and dij . The assumed correlation for the spatial correlated error

term is �=dij for i; j = 1; 2; :::; N . For the probit model this correlation is between the

latent error, and for the count data model this correlation is between the multiplicative

error. The data are divided into groups of 4, 16. And you can use more observations

34

Page 35: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

in one group, say, 25 and 100. But this increase the computation burden and 25 and

100 are too big for the sample size 400. In Graph 1, the left upper corner of the lattice

demonstrates the case that the group size is four; the left lower corner of the lattice

demonstrates the case that the group size is 16; and the righ lower part of the lattice

demonstrates the case that the group size is 100. The idea of this two-step method

is to use a small number of pairwise correlations and conveniently get more e¢ cient

estimators. Thus, I use 4 or 16 as the number of observations in each group. Notice,

for convenience, I make the pairwise distances in di¤erent groups the same.

Graph 1

35

Page 36: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

7.2. Spatial Probit Data

For the probit model, we can not easily �nd the variances and covariances for the

dependent variables conditional on the covariates. The corrlated latent errors result in

correlated binary response varibles. However, the correlations in latent error usually do

not re�ect the exact correlations in the binary dependent variables. The correlations are

much smaller in the binary response variable because of the nonlinear tranformation.

In the following simulation, let the sample size be 400 and replication be 500. Consider

the following data generating process:

1. xi = [1; xi1]; xi1 � N(1; 1) ; � = [�1; 1]0:

2. y�i = xi�+ei; e � MVN(0;); Var (ei) = 1; Cov (ei; ej) =�dij; � =

0; 0:1; 0:2; 0:3; 0:4:

3. yi = 1 if y�i � 0; yi = 0 if y�i < 0:

4. Use Cov (yi; yj jxi;xj ;DN ) =�dij

as the correlation between the dependent vari-

ables. This form is arbitrary. Based on the information, this is not likely to be true and

� is unknown.

The simulation results are in Table 1-2. � is the estimator for �. � is calculated by the

minimum distance estimatormin�GXg=1

LXi=1

LXj 6=i

"�ui�ujq

�(xi��)[1��(xi��)]q�(xj��)[1��(xj��)]

� �dij

#,

for i; j in the same group g; and L is the number of individuals in a group. Because � is

unknown, we can not calculate the bias of � . �� is the �rst-step partial QMLE estimator

for �. �1 is the two-step weighted nonlinear least squred estimator (WNLS) that only

uses the variances as weight in the second step. �4 is the two-step GEE estimator that

uses a 4 � 4 variance covariance matrix as weight for each group. �16 is the two-step

GEE estimator that uses a 16�16 variance covariance matrix as weight for each group.

Note that when L = 4, �16 is calculated by using � which is calculated using group size

equal 4. Similarly for �4 when L = 16. The following two tables show two cases of the

36

Page 37: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

N=400, L=4, T=500, � = 1

� � �� �1 �4 �160 estimate 0:0032 1:0162 1:0162 1:0155 1:0169

s.d 0:0419 0:1111 0:1011 0:1144 0:11180:1 estimate 0:0281 1:0139 1:0139 1:0145 1:1053

s.d 0:0501 0:1166 0:1166 0:1165 0:11720:2 estimate 0:0616 1:0241 1:0241 1:0243 1:0261

s.d 0:0575 0:1103 0:1103 0:1111 0:11360:3 estimate 0:0903 1:0242 1:0233 1:0253 1:0251

s.d 0:0558 0:1138 0:1147 0:1142 0:11570:4 estimate 0:1281 1:0444 1:0434 1:0484 1:0515

s.d 0:0745 0:1128 0:1148 0:1185 0:1162

TABLE 1Binary Data N=400, L=4

N=400, L=16, T=500, � = 1

� � �� �1 �4 �160 estimate �0:0033 1:0042 1:0043 1:0037 1:0050

s.d 0:0267 0:1082 0:1081 0:1103 0:10810:1 estimate 0:0238 1:0165 1:0165 1:0164 1:0166

s.d 0:0338 0:1174 0:1174 0:1170 0:11710:2 estimate 0:0504 1:0295 1:0280 1:0300 1:0303

s.d 0:0407 0:1118 0:1154 0:1120 0:11250:3 estimate 0:0822 1:0336 1:0336 1:0346 1:0366

s.d 0:0539 0:1121 0:1121 0:1135 0:11350:4 estimate 0:1100 1:0483 1:0483 1:0494 1:0516

s.d 0:0601 0:1277 0:1277 0:1283 0:1298

TABLE 2Binary Data N=400, L=16

simulation: (1) N=400, L=4. (2) N=400, L=16.

From the above results, � is much smaller than �, which implies that a high spatial

correlation in the latent error term may only cause a tiny correlation in the binary

response variables. The PQMLE �� delivers almost the same e¢ cicency as the other

three two-step estimators. Since the correlations between the binary dependent variables

are low, a two-step estimator may not be necessary. One can use other data generating

process to generate highly correlated binary dependent variables to examine the two-step

method.

37

Page 38: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

7.3. Spatial Count Data

Compared to the probit model, some positive results are found in the count data

case. In the count data case, the variances and covariances of the count dependent

variable can be written in a closed form. This avoids the situation that we can not

compare the estimated spatial correlation parameter and the true parameter. Moreover,

by knowing the correlations in the spatial error term, we know the correlations in the

count dependent variable.

Remeber the assumption of conditional mean function for the count data is

E (yijxi; vi; DN ) = exp (xi� + ei) = vi exp (xi�0) : Consider the following case of

the spatial data generating process:

1. ei; i = 1; 2; :::; N follows a multivariate normal distribution with E(ei) = � 12

and Var (ei) = 1; Cov(ei; ej) =�dij; and � = 0; 0:1; 0:2; 0:3; 0:4; 0:5; 0:6: Therefore, vi

follows a multivariate lognormal distribution with E(vi) = 1 and Var (vi) = �2 =

e � 1 � 1:7183; Cov(vi; vj) = exp��dij

�� 1; When dij equals one Cov(vi; vj) equals

0; 0:11; 0:22; 0:35; 0:49; 0:65; 0:82 seperately and Corr(vi; vj) equals 0; 0:06; 0:13; 0:20; 0:28;

0:37; 0:58 seperately. But the correlations between v0is do not represent the correla-

tions between y0is.

2. xi = [1; xi1]; xi1 � N(0; 1)

3. � = [1; 1]0

4. mi = exp (xi�+ei)

5. yi � Poisson (mi)

Since we can calculate the true variances and covariances of y conditional on X,

the GEE approach is actually a weighted multivariate nonlinear least squares approach.

As long as we can �nd consistent estimators for �2 and �, we can do the second step

estimation. Using the information above, �2 can be estimated by �2 as the coe¢ cient by

38

Page 39: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

regressing y2i �exp�xi��

�on exp

�2xi��

�: �2 does not depend on distances. � is found by

a minimum distance estimator by using within group sample correlations. The minimun

distance estimator is given by minimizingGXg=1

LXi=1

LXj 6=i

��ui�uj

exp(xi��) exp(xj��)� exp

��dij

�+ 1

�for i; j in the same group g; and L is the number of individuals in a group. For exam-

ple, L = 4 means spatial correlation parameters are calculated by using within group

correlation with group size equal four. �4 and �16 are spatial correlation estimators for

� that using group size 4 and 16. �� is the �rst step partial QMLE estimator for �. �1

is the two-step weighted nonlinear least squred estimator (WNLS) that only uses the

variances as weight in the second step. �4 is the two-step GEE estimator that uses a

4 � 4 variance covariance matrix as weight for each group. �16 is the two-step GEE

estimator that uses a 16� 16 variance covariance matrix as weight for each group.

Table 3-4 show two cases of the simulation: (1) N=400, L=4 and L=16; (2) N=1600,

L=4 and L=16. We can see that all the three two-step estimators �1; �4 and �16 are all

much more e¢ cient than the one-step estimator ��. The two GEE estimators �4 and �16

has some slight improvement in some cases when � is larger than 0.3, but not much. In

general the WNLS estimator �1 which uses only variances as weight has accounted for

the most of the e¢ ciency. The GEE approach actually does not show much advantage

in the count data example. When sample size increases, e¢ ciency gains. The mininum

distance estimator for � are biased downwards and linear regression estimator for �2 are

biased upwards. Even though the spatial parameters are biased, this still give us more

e¢ cient estimators than the PQMLE ��.

39

Page 40: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

N=400, T=500, L=4 L=16 �2 � 1:718; � = 1

� �4 �16 �2 �� �1 �4 �160 estimate �0:002 0:000 1:768 1:002 0:989 0:989 0:989

bias �0:002 0:000 0:050 0:002 �0:011 �0:011 �0:011(s.d.) (0:124) (0:114) (1:224) (0:130) (0:082) (0:082) (0:082)

0.1 estimate 0:072 0:079 1:748 0:999 0:987 0:987 0:987bias �0:028 �0:021 0:030 �0:001 �0:013 �0:013 �0:013s.d. (0:134) (0:139) (1:219) (0:131) (0:080) (0:081) (0:081)

0.2 estimate 0:156 0:171 1:748 1:000 0:985 0:984 0:987bias �0:044 �0:029 0:030 0:000 �0:015 �0:016 �0:013s.d. (0:142) (0:139) (1:219) (0:128) (0:099) (0:103) (0:079)

0.3 estimate 0:248 0:251 1:736 0:999 0:987 0:987 0:986bias �0:052 �0:049 0:018 �0:001 �0:013 �0:013 �0:014s.d. (0:154) (0:147) (1:233) (0:129) (0:087) (0:091) (0:095)

0.4 estimate 0:328 0:328 1:730 0:997 0:990 0:991 0:990bias �0:072 �0:072 0:233 �0:003 �0:008 �0:009 �0:010s.d. (0:161) (0:166) (1:194) (0:132) (0:079) (0:077) (0:076)

0.5 estimate 0:401 0:401 1:725 0:998 0:992 0:993 0:991bias �0:099 �0:099 0:007 �0:002 �0:008 �0:007 �0:009s.d. (0:177) (0:175) (1:182) (0:133) (0:079) (0:079) (0:087)

0.6 estimate 0:478 0:473 1:761 0:995 0:985 0:984 0:986bias �0:122 �0:127 0:043 �0:005 �0:015 �0:016 �0:014s.d. (0:173) (0:177) (1:233) (0:140) (0:084) (0:081) 0:081

TABLE 3Count Data N=400, L=4 and 16

40

Page 41: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

N=1600, T=500, L=4 L=16 �2 � 1:718; � = 1

� �4 �16 �2 �� �1 �4 �160 estimate �0:003 -0:001 2:014 0:995 0:993 0:993 0:993

bias �0:003 -0:001 0:296 -0:005 �0:007 �0:007 �0:007(s.d.) (0:057) (0:051) (2:158) (0:068) (0:039) (0:039) (0:039)

0.1 estimate 0:104 0:104 1:990 0:996 0:993 0:993 0:993bias 0:004 0:004 0:272 -0:001 �0:007 �0:007 �0:007s.d. (0:067) (0:069) (2:011) (0:039) (0:039) (0:039) (0:039)

0.2 estimate 0:197 0:201 1:999 0:996 0:994 0:994 0:994bias �0:003 0:001 0:211 -0:004 �0:006 �0:006 �0:006s.d. 0:083 0:080 1:979 (0:071) (0:040) (0:040) (0:040)

0.3 estimate 0:292 0:299 1:985 0:996 0:993 0:993 0:994bias �0:008 �0:001 0:257 -0:004 �0:007 �0:007 �0:006s.d. (0:087) 0:092 (2:023) (0:071) (0:040) (0:039) (0:039)

0.4 estimate 0:389 0:393 2:003 0:997 0:994 0:995 0:995bias �0:011 �0:007 0:285 �0:003 �0:006 �0:005 �0:005s.d. (0:108) (0:115) (2:107) (0:070) (0:038) (0:037) (0:037)

0.5 estimate 0:484 0:487 2:036 0:997 0:994 0:994 0:996bias �0:016 �0:013 0:218 �0:003 �0:006 �0:006 �0:004s.d. (0:121) (0:126) (2:150) (0:068) (0:039) (0:038) (0:051)

0.6 estimate 0:571 0:572 2:046 0:997 0:994 0:995 0:995bias �0:029 �0:028 0:318 �0:003 �0:006 �0:005 �0:005s.d. (0:130) (0:136) (2:196) (0:070) (0:041) (0:044) 0:056

TABLE 4Count Data N=1600, L=4 and 16

41

Page 42: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

The simulation results do not delivers intuitive results. For some reason, the GEE

approach is not working well in this data generating process. One may doubt that there

may not be much correlation in the dependent variable. In some cases, such as the

probit case, it happens that when we have a fairly high spatial correlation in the latent

error the binary response variable does not show much spatial correlation. But in the

count data case, the correlation of the dependent variable can be written in a closed

form. The correlations for yi and yj conditional on xi;xj ; dij is

Corr�yi; yj jxi;xj ; dij

�(68)

=exp (xi�0) exp (xj�0) [exp (�=dij)� 1]p

exp (xi�0) + exp (2xi�0) � �2pexp (xj�0) + exp (2xj�0) � �2

:

We can calculate the sample correlations in the simulated count data. For each replica-

tion t, let ui = yi � exp (xi�0) ; and the sample correlation of y for each t is:

dcorrt �yi; yj jxi;xj ; dij� (69)

=1

Nij

NXi

NXj>i

uiujpexp (xi�0) + exp (2xi�0) �

2pexp (xj�0) + exp (2xj�0) �

2;

where Nij is the numbers of distinct pairs of observations whose distance is equal to dij .

The following two table show the sample correlations in y over the replications. The

correlations are calculated separately for pairs of y0is that are 1, 2, 5 apart from each

other. As shown in Table 5, as the pairwise distance increase, the correlations decreases.

There is almost no correlation if two observation are 5 apart from each other. Moreover,

the spatial parameter � can be as high as 0:6, and the sample correlation of y can be as

high as more than 0:4, which is fairly high spatial correlation.

42

Page 43: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

T=500 N=400 L=1600dij 1 2 5 1 2 5Nij 760 720 1688 3170 3040 8028� dcorr �yi; yj jxi;xj ; dij� dcorr �yi; yj jxi;xj ; dij�0 0:001 0:001 �0:000 �0:002 0:001 0:0000:1 0:050 0:024 0:009 0:048 0:025 0:0090:2 0:101 0:047 0:016 0:102 0:050 0:0180:3 0:158 0:073 0:025 0:165 0:077 0:0280:4 0:233 0:105 0:034 0:237 0:110 0:0390:5 0:306 0:135 0:042 0:323 0:145 0:0500:6 0:411 0:185 0:054 0:430 0:193 0:063

TABLE 5Correlations in Simulated Count Data

8. CONCLUSION

The spatial correlation in nonlinear models makes it more di¢ cult to get e¢ cient

estimators. For a probit model, because of the nonlinearity, it is hard to �nd the

real form of spatial correlations between two dependent variables. Thus the estimated

variance covariance matrix is likely to be misspeci�ed. The QMLE and GEE approach

which uses the misspeci�ed variance covariance matrix will not improve the estimation

e¢ ciency compared to a PQMLE approach. In the spatial count data model case, since

we can actually write down the variances and covariances of the dependent variables

based on certain assumptions, we can use a multivariate nonlinear weighted least squares

(MNWLS) to improve the e¢ ciency. For some reason, accounting for spatial correlation

will not improve much e¢ ciency in the count data example. The experiment in this

paper does not contribute to the literature in a signi�cant way. It is, nevertheless, worth

trying. The further study will focus on why GEE approach does not work well with

spatial data, how to get a better estimator for the spatial correlation parameter, how

to get a good approximation of the correlation structure and how to incorporate spatial

correlation in other nonlinear models, such as multi-catogary binary choice, fractional

response, two-part model and so on.

43

Page 44: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

REFERENCES

[1] Anselin, L., (2010). �Thirty Years of Spatial Econometrics,� Papers in Regional

Science, 89, 3�25.

[2] Arbia, (2006). Spatial Econometrics. Springer.

[3] Bester, A., Conley, T., Hansen, C. and Vogelsang, T. (2008), "Fixed-b asymptotics

for spatially dependent robust nonparametric covariance matrix estimators".

[4] Bolthausen (1982), "On the Central Limit Theorem for Stationary Mixing Random

Fields," The Annals of Probability, Vol. 10, No. 4, 1047-1050.

[5] Brown, J. R., Ivkovic, Z., Smith, P. A. and Wwisbenner, S. (2008), "Neighbors

Matter: Causal Community E¤ects and Stock Market Participation," The Journal

of Finance, 63: 1509�1531.

[6] Bloom,N., Schankerman, M., and VanReenen, J. (2012), "Identifying technology

spillovers and product market rivalry," NBER working paper.

[7] Conley, T.G. (1999), "GMM estimation with cross sectional dependence," Journal

of Econometrics, Volume 92, Issue 1,1-45.

[8] Cressie, N. A. C. (1993), Statistics for Spatial Data, Wiley Series in Probability

and Mathematical Statistics: Applied Probability and Statistics, New York: John

Wiley & Sons Inc., a Wiley-Interscience Publication.

[9] Dubin, R. A. (1988), "Estimation of Regression Coe¢ cients in the Presence of

Spatially Autocorrelated Error Terms".

[10] Gneiting, T. (2002), "Compactly supported correlation functions," J. Multivariate

Anal. 83 493�508.

44

Page 45: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

[11] Gourieroux, C., A. Monfort and A. Trognon (1984), "Pseudo Maximum Likelihood

Methods: Applications to Poisson Models," Econometrica , Vol. 52, No. 3, pp.

701-720

[12] Harry H. Kelejian, Ingmar R. Prucha (2007), "HAC estimation in a spatial frame-

work," Journal of Econometrics, Volume 140, Issue 1, September 2007, Pages 131-

154

[13] Jenish, N., and Prucha, I. (2009), "Central limit theorems and uniform laws of

large numbers for arrays of random �elds," Journal of Econometrics 150: 86�98.

[14] Kaufman, C., Schervish, M. and Nychka, D. (2008)," Covariance tapering for

likelihood-based estimation in large spatial datasets," J. Amer. Statist. Assoc. 103

1545�1555.

[15] Lee, L.F.(2004). "Asymptotic Distributions of Quasi-Maximum Likelihood Estima-

tors for Spatial Autoregressive Models," Econometrica, Vol. 72, 1899-1925.

[16] Prentice, R. L. (1988), "Correlated binary regression with covariates speci�c to

each binary observation," Biometrics AA, 1033-48.

[17] Wang, H., Iglesias, E. and Wooldrige, J. (2009). "Partial Maximum Likelihood

Estimation of Spatial Probit Models," working paper; forthcoming Journal of Ec-

nonometrics.

[18] Wooldridge, J. (2011), Econometric Analysis of Cross Section and Panel Data.

MIT.

[19] Zeger, S. L., Liang, K. Y., and Albert, P. S. (1988), "Models for Longitudinal Data:

A Generalized Estimating Equation Approach," Biometrics, 44, 1049- 1060.

45

Page 46: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

9. APPENDIX

Proof of Propersition 1.

Proof. The proof follows Theorem 2 in Jenish and Prucha (2009). A su¢ cient

condition for consistency estimators is that the objective function satis�es the uniform

law of large numbers (ULLN). To prove the ULLN, we need a pointwise law of large

numbers (LLN). From Assumption 5, we have a pointwise LLN, and we get QN (�)�

�QN (�) !a:s: 0; where �QN (�) = E (QN (�)) :Since QN (�) is the sample average of qi;

it is also stochastically equicontinuous. Then we have sup����QN (�)� �Q (�)

���!a:s: 0 as

N !1, which is the uniform law of large numbers.

Proof of Propersition 2.

Proof. Proof of Propersition 2 is similar to the proof of Propersition1. Instead of

writing the objective function in the sum of individuals, we write it as the sum of

groups. The pointwise LLN can be written as QG (�)� �QG (�)!a:s: 0; where �QG (�) =

E (QG (�)) : In addition with the stochatically equicontinuity condition, sup����QG (�)� �Q (�)

���!a:s: 0 as G!1:

Proof of Propersition 3.

Proof.

SG����=

GXg=1

sg����= 0

=GXg=1

sg (�0) +GXg=1

Hg

������ � �0

46

Page 47: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

��� � �0

�=

"�

GXg=1

Hg

����#�1 GX

g=1

sg (�0)

pG��� � �0

�=

"� 1G

GXg=1

Hg

����#�1 1p

G

GXg=1

sg (�0)

By uniform law of large numbers for mixing �elds,

� 1G

GXg=1

Hg

����

! pA0

A0 = E [Hg (�0)]

By Central Limit Theorem in Jenish and Prucha (2009),

1pG

GXg=1

sg (�0) ) dN (0;B0)

B0 = limG!1

1

GVar

"GXg=1

sg (�0)

#

Thus we have

pG��� � �0

�)d N

�0;A�1

0 B0A�10

�:

Proof for Propersition 4.

Proof.

pG��G��0

�=

"� 1G

GXg=1

Hg

���;

�#�1 GXg=1

sg (�0; ) ;

pG��G��0

�= A0

� 1p

G

GXg=1

sg (�0; )

!+ op (1) ;

where A0 = limG!1

n� 1G

PGg=1 E [Hg (�0;

�)]oby law of large numbers for mixing

47

Page 48: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

sequences.

1pG

GXg=1

sg (�0; ) =1pG

GXi=1

sg (�0; �) + F0

pG ( � �) + op (1) ;

where F0 is a P � J matrix, F0 = limi!1

n1G

PGg=1 E [r sg (wi;�0; �)]

o:

AssumepG ( � �) can be written in the following form:

pG ( � �) = 1p

G

GXg=1

rg ( �) + op (1) ;

where rg ( �) is a J � 1 vector with E [rg ( �)] = 0 . Then

pG�� � �0

�= A0

1pG

GXg=1

[�eg (�0; �)] + op (1)

eg (�0; �) � sg (�0; �) + F0rg ( �)

D0 � limG!1

1

GE

"GXg=1

eg (�0; �)

GXh=1

eh (�0; �)0#

AvarpG�� � �0

�= A�1

0 D0A�10

In the case of QMLE, we can see rm0g (�) and mg (�) do not rely on : When we

take derivatives with respect to , it only matters with W�1g . r sg (wg;�0; �) is

a linear combination of elements of [yg �mg (�)] : Since the E[(yg �mg) jw;D] = 0,

E [r sg (wg;�0; �) jw;D] = 0: By law of iterated expectations, E [r sg (wg;�0; �)] =

0. Thus F0 = 0.

AvarpG�� � �0

�= A�1

0 B0A�10

and B0 = limG!1Varh1pG

PGg=1 sg (�0;

�)i

Proof for Propersition 5.

48

Page 49: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

Proof. Let rmg = rmg

���; rm0

g = rm0g

���:

The proof consists two parts: (1) A! A0;(2)B2 ! B0:

Part (1) prove that A! A0:

A = 1G

PGg=1rm0

gW�1g rmg ! limG!1

1G

PGg=1 E

�rm0

gW�1g rmg

�= A0

Part (2) prove that B2 ! B0:

B2=1

G

GXg=1

GXh=1

k(dgh)rm0gW

�1g ugu

0hW

�1h rmh;

and

B0 = limG!1

1

G

GXg=1

E�rm0

gW�1g ugu

0gW

�1g rmg

�+ limG!1

1

G

GXg=1

GXg 6=h

E�rm0

gW�1g uguhW

�1h rmh

�:

De�ne

Zg = rmgW�1g ug

Zg = rm0gW

�1g ug

For a given G,

B2 =1

G

GXg=1

rm0gW

�1g ugu

0gW

�1g rmg +

1

G

GXg=1

GXg 6=h

k(dgh)rmhW�1g ugu

0hW

�1h rmh

=1

G

GXg=1

Z0

gZg +1

G

GXg=1

GXg 6=h

k(dgh)Z0

gZh;

49

Page 50: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

B0 =1

G

GXg=1

E�rm0

gW�1g ugu

0gW

�1g rmg

�+1

G

GXg=1

GXg 6=h

E�rm0

gW�1g ugu

0hW

�1h rmh

�=

1

G

GXg=1

EhZ

0

gZg

i+1

G

GXg=1

GXg 6=h

EhZ

0

gZh

i:

De�ne

Bk0 =1

G

GXg=1

E�rm0

gW�1g ugu

0gW

�1g rmg

�+1

G

GXg=1

GXg 6=h

k(dgh)E�rm0

gW�1g ugu

0hW

�1h rmh

�=

1

G

GXg=1

E�Z

0

gZg

�+1

G

GXg=1

GXg 6=h

k(dgh)E�Z

0

gZh

�;

Bk =1

G

GXg=1

�rm0

gW�1g ugu

0gW

�1g rmg

�+1

G

GXg=1

GXg 6=h

k(dgh)�rm0

gW�1g ugu

0hW

�1h rmh

�=

1

G

GXg=1

Z0

gZg +1

G

GXg=1

GXg 6=h

k(dgh)Z0

gZh:

50

Page 51: Estimation of Nonlinear Models in a Quasi-Maximum Likelihood Framework …lucuicui/documents/JMP_CuicuiLu.pdf · 2012-12-02 · Estimation of Nonlinear Models in a Quasi-Maximum Likelihood

Next,

���B2�B0��� =���B2�Bk +Bk �Bk0 +Bk0 �B0���

����B2�Bk���+ ��Bk �Bk0��+ ��Bk0 �B0��

=

������B2�24 1G

GXg=1

Z0

gZg +1

G

GXg=1

GXg 6=h

k(dgh)Z0

gZh

35������+

������ 1GGXg=1

hZ

0

gZg � E�Z

0

gZg

�i+1

G

GXg=1

GXg 6=h

k(dgh)hZ

0

gZh � E�Z

0

gZh

�i������+

������ 1GGXg=1

E�Z

0

gZg

�+1

G

GXg=1

GXg 6=h

k(dgh)E�Z

0

gZh

��B0

������=

������B2�24 1G

GXg=1

Z0

gZg +1

G

GXg=1

GXg 6=h

k(dgh)Z0

gZh

35������+

������ 1GGXg=1

hZ

0

gZg � E�Z

0

gZg

�i+1

G

GXg=1

GXg 6=h

k(dgh)hZ

0

gZh � E�Z

0

gZh

�i������+

������ 1GGXg=1

GXg 6=h

k(dgh)E�Z

0

gZh

�� 1G

GXg=1

GXg 6=h

EhZ

0

gZh

i�������

������B2�24 1G

GXg=1

Z0

gZg +1

G

GXg=1

GXg 6=h

k(dgh)Z0

gZh

35������ (70)

+

������ 1GGXg=1

hZ

0

gZg � E�Z

0

gZg

�i+1

G

GXg=1

GXg 6=h

k(dgh)hZ

0

gZh � E�Z

0

gZh

�i������+1

G

GXg=1

GXg 6=h

jk(dgh)� 1j���E�Z 0

gZh

����Next, prove each of the right hand side term goes to zero. De�ne pgh = Z

0

gZh �

E�Z

0

gZh

�. Use this device to make the mean value expansion go to zero and this will

complete the proof.

51