format_iar | R Documentation |
Given an adjacency matrix, formats data for using IAR priors to model spatial structure. Otherwise, assumes default structure where neighbors are defined as variables directly above or to the side of a specified variable location.
format_iar(
adjmat = NULL,
im.res = NULL,
x = NULL,
tau.prior = "none",
tau.manual = NULL
)
adjmat |
A data.frame or matrix containing a "sparse" representation of the neighbor relationships. The first column should contain a numerical index for a given location. Each index will be repeated in this column for every neighbor it has. The indices for the location's neighbors are then specified in the second column. An optional third column specifies weights. If no third column is specified, then equal weights are assumed. |
im.res |
A 2-element vector where the first argument is the number of
"rows" and the second argument is the number of "columns" in each subject's
"image". Default is |
x |
Design, or input, matrix, of dimension nobs x nvars; each row is
an observation vector. It is recommended that |
tau.prior |
One of |
tau.manual |
When |
A list containing data formatted for using IAR priors.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.