Bayesian estimates of parameters of SAR and SDM type spatial models require the computation of the log-determinant of positive-definite spatial projection matrices of the form \((I_n - \rho W)\), where \(W\) is a \(n\) by \(n\) spatial weight matrix. However, direct computation of the log-determinant is computationally expensive.
logdetPaceBarry(W, length.out = 200, rmin = -1, rmax = 1)numeric length.out by 2 matrix; the first column
contains the approximated log-determinants the second column the \(\rho\) values
ranging between rmin and rmax.
numeric \(n\) by \(n\) non-negative spatial weights matrix, with zeros on the main diagonal.
single, integer number, has to be at least 51 (due to order of approximation). Sets how fine the grid approximation is. Default value is 200.
single number between -1 and 1. Sets the minimum value of the
spatial autoregressive parameter \(\rho\). Has to be lower than
rmax. Default value is -1.
single number between -1 and 1. Sets the maximum value of the
spatial autoregressive parameter \(\rho\). Has to be higher than
rmin. Default value is 1.
This function wraps the log-determinant approximation by Barry and Pace (1999), which can be used to pre-compute the log-determinants over a grid of \(\rho\) values.
Barry, R. P., and Pace, R. K. (1999) Monte Carlo estimates of the log determinant of large sparse matrices. Linear Algebra and its applications, 289(1-3), 41-54.