sar_eigs function

compute the eigenvalues for the spatial weight matrix W

compute the eigenvalues for the spatial weight matrix W

compute the eigenvalues lambdalambda for the spatial weight matrix WW and lower and upper bound for parameter rhorho.

sar_eigs(eflag, W)

Arguments

  • eflag: if eflag==1, then eigen values
  • W: spatial weight matrix

Returns

function returns a list of - rmin: minimum value for rhorho. if eflag==1, then 1/min(lambda)1/min(lambda) , else -1

  • rmax: maximum value for rhorho. Always 1.

  • time: execution time

Author(s)

James P. LeSage, Adapted to R by Miguel Godinho de Matos miguelgodinhomatos@cmu.edu

Examples

set.seed(123) # sparse matrix representation for spatial weight matrix W (d x d) # and m nearest neighbors d <- 100 m <- 6 W <- sparseMatrix(i=rep(1:d, each=m), j=replicate(d, sample(x=1:d, size=m, replace=FALSE)), x=1/m, dims=c(d, d)) sar_eigs(eflag=1, W)