View source: R/logdetPaceBarry.R
logdetPaceBarry | R Documentation |
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)
W |
numeric |
length.out |
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. |
rmin |
single number between -1 and 1. Sets the minimum value of the
spatial autoregressive parameter |
rmax |
single number between -1 and 1. Sets the maximum value of the
spatial autoregressive parameter |
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.
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
.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.