SpatialProbitFit(formula,data,W,
DGP='SAR',method="conditional",varcov="varcov",control=list())
formula
: a symbolic
description of the model to be fitted."dgCMatrix"
.data
: SAR or SEM
(Default is SAR)."conditional"
or
"full-lik"
(Defaul is "conditional"
, see Details)."varcov"
) or the precision matrix
("precision"
)? Default is "varcov"
.SpatialProbit
:
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]The approximation is inspired by the Mendell-Elston approximation of the multivariante normal probabilities (see References). It makes use of the Cholesky decomposition of the variance-covariance matrix $\Sigma$.
The SpatialProbitFit
command estimates the model by maximising the
approximate log-likelihood. We propose two optimisation method:
[object Object],[object Object]
In both cases a "conditional"
estimation is performed. If
method="conditional"
, then SpatialProbitFit
returns
the results of this first estimation. In case method="full-lik"
,
the function tries to improve the log-likelihood by means of a further
exploration around the value of the parameters found by the conditional
step.
The conditional step is usually very accurate and particularly fast. The
second step is more time consuming and does not always improve the results
of the first step. We dissuade the user from using the full-likelihood
method for sample sizes bigger than ten thousands, since the computation of
the gradients is quite slow. Simulation studies reported in Martinetti and
Geniaux (2015) prove that the conditional estimation is highly reliable,
even if compared to the full-likelihood ones.
In order to reduce the computation time of the function
SpatialProbitFit
, we propose a variant of the likelihood-function
estimation that uses the inverse of the variance-covariance matrix (a.k.a.
precision matrix). This variant applies to both the "conditional"
and
the "full-lik"
methods and can be invoked by setting
varcov="precision"
. Simulation studies reported in Martinetti and
Geniaux (2015) suggest that the accuracy of the results with the precision
matrix are sometimes worst than the one with the true variance-covariance
matrix, but the estimation time is considerably reduced.
The control argument is a list that can supply any of the following components: [object Object],[object Object],[object Object],[object Object],[object Object]
n <- 1000
nneigh <- 3
rho <- 0.5
beta <- c(4,-2,1)
W <- generate_W(n,nneigh,seed=123)
X <- cbind(1,rnorm(n,2,2),rnorm(n,0,1))
colnames(X) <- c("intercept","X1","X2")
y <- sim_binomial_probit(W=W,X=X,beta=beta,rho=rho,model="SAR")
d <- as.data.frame(cbind(y,X))
mod <- SpatialProbitFit(y~X1+X2,d,W,
DGP='SAR',method="conditional",varcov="varcov")
Run the code above in your browser using DataLab