Learn R Programming

spatialprobit (version 0.9-10)

sarorderedprobit: Bayesian estimation of the SAR ordered probit model

Description

Bayesian estimation of the spatial autoregressive ordered probit model (SAR ordered probit model).

Usage

sarorderedprobit(formula, W, data, subset, ...)

sar_ordered_probit_mcmc(y, X, W, ndraw = 1000, burn.in = 100, thinning = 1, 
  prior=list(a1=1, a2=1, c=rep(0, ncol(X)), T=diag(ncol(X))*1e12, lflag = 0), 
  start = list(rho = 0.75, beta = rep(0, ncol(X)), 
  phi = c(-Inf, 0:(max(y)-1), Inf)),
  m=10, computeMarginalEffects=TRUE, showProgress=FALSE)

Arguments

y
dependent variables. vector of zeros and ones
X
design matrix
W
spatial weight matrix
ndraw
number of MCMC iterations
burn.in
number of MCMC burn-in to be discarded
thinning
MCMC thinning factor, defaults to 1.
prior
A list of prior settings for $\rho \sim Beta(a1,a2)$ and $\beta \sim N(c,T)$. Defaults to diffuse prior for beta.
start
list of start values
m
Number of burn-in samples in innermost Gibbs sampler. Defaults to 10.
computeMarginalEffects
Flag if marginal effects are calculated. Defaults to TRUE. Currently without effect.
showProgress
Flag if progress bar should be shown. Defaults to FALSE.
formula
an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted.
data
an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the e
subset
an optional vector specifying a subset of observations to be used in the fitting process.
...
additional arguments to be passed

Value

  • Returns a structure of class sarprobit:
  • betaposterior mean of bhat based on draws
  • rhoposterior mean of rho based on draws
  • phiposterior mean of phi based on draws
  • coefficientsposterior mean of coefficients
  • fitted.valuesfitted values
  • fitted.reponsefitted reponse
  • ndraw# of draws
  • bdrawbeta draws (ndraw-nomit x nvar)
  • pdrawrho draws (ndraw-nomit x 1)
  • phidrawphi draws (ndraw-nomit x 1)
  • a1a1 parameter for beta prior on rho from input, or default value
  • a2a2 parameter for beta prior on rho from input, or default value
  • timetotal time taken
  • rmax1/max eigenvalue of W (or rmax if input)
  • rmin1/min eigenvalue of W (or rmin if input)
  • tflag'plevel' (default) for printing p-levels; 'tstat' for printing bogus t-statistics
  • lflaglflag from input
  • cflag1 for intercept term, 0 for no intercept term
  • lndeta matrix containing log-determinant information (for use in later function calls to save time)
  • Wspatial weights matrix
  • Xregressor matrix

Details

Bayesian estimates of the spatial autoregressive ordered probit model (SAR ordered probit model) $$z = \rho W z + X \beta + \epsilon, \epsilon \sim N(0, I_n)$$ $$z = (I_n - \rho W)^{-1} X \beta + (I_n - \rho W)^{-1} \epsilon$$ where y is a $(n \times 1)$ vector of discrete choices from 1 to J, $y \in {1,2,...,J}$, where $y = 1$ for $-\infty \le z \le \phi_1 = 0$ $y = 2$ for $\phi_1 \le z \le \phi_2$ ... $y = j$ for $\phi_{j-1} \le z \le \phi_j$ ... $y = J$ for $\phi_{J-1} \le z \le \infty$ The vector $\phi=(\phi_1,...,\phi_{J-1})'$ $(J-1 \times 1)$ represents the cut points (threshold values) that need to be estimated. $\phi_1 = 0$ is set to zero by default. $\beta$ is a $(k \times 1)$ vector of parameters associated with the $(n \times k)$ data matrix X. $\rho$ is the spatial dependence parameter. The error variance $\sigma_e$ is set to 1 for identification. Computation of marginal effects is currently not implemented.

References

LeSage, J. and Pace, R. K. (2009), Introduction to Spatial Econometrics, CRC Press, chapter 10, section 10.2

See Also

sarprobit for the SAR binary probit model