get_adj_mat {BSTZINB} | R Documentation |
Creates the adjacency matrix for the supplied counties within the United States using the available neighborhood information
get_adj_mat(county.adjacency,Countyvec,Statevec)
county.adjacency |
data frame containing the neighborhood information for the counties of the entire US |
Countyvec |
character vector containing the names of the counties for which the adjacency matrix is to be computed |
Statevec |
character vector containing the names of the states the supplied counties belong to |
the corresponding adjacency matrix
data(county.adjacency)
data(USAcities)
IAcities <- subset(USAcities,state_id=="IA")
countyname <- unique(IAcities$county_name)
A <- get_adj_mat(county.adjacency,countyname,c("IA"))