W_priors: Set prior specifications for the spatial weight matrix

View source: R/priors.R

W_priorsR Documentation

Set prior specifications for the spatial weight matrix

Description

Set prior specifications for the n by n spatial weight matrix W=f(Ω), where Ω is an n by n unknown binary adjacency matrix (with zeros on the main diagonal), and f() denotes the (optional) row-standardization function

Usage

W_priors(
  n,
  W_prior = matrix(0.5, n, n),
  symmetric_prior = FALSE,
  row_standardized_prior = TRUE,
  nr_neighbors_prior = bbinompdf(0:(n - 1), nsize = n - 1, a = 1, b = 1, min_k = 0, max_k
    = n - 1)
)

Arguments

n

The number of spatial observations

W_prior

An n by n matrix of prior inclusion probabilities for W

symmetric_prior

Binary value. Should the estimated adjacency matrix Ω be symmetric (default: FALSE)? if TRUE: Ω is forced symmetric; if FALSE: Ω not necessarily symmetric.

row_standardized_prior

Binary value. Should the estimated W matrix be row-standardized (default: TRUE)? if TRUE: row-stochastic W; if FALSE: W not row-standardized.

nr_neighbors_prior

An n dimensional vector of prior weights on the number of neighbors (i.e. the row sums of the adjacency matrix Ω), where the first element denotes the prior probability of zero neighbors and the last those of n-1. A prior using only fixed inclusion probabilities for the entries in Ω would be an n dimensional vector of 1/n. Defaults to a bbinompdf prior, with prior parameters a = 1, b = 1.


estimateW documentation built on Dec. 6, 2022, 5:11 p.m.