createAdj(season)
createAdj()所属R语言包:season
Creates an adjacency matrix
创建一个邻接矩阵
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Creates an adjacency matrix in a form suitable for using in BRugs or WinBUGS.
建立邻接矩阵BRugs或WinBUGS在使用适合的形式。
用法----------Usage----------
createAdj(matrix, filename='Adj.txt', suffix=NULL)
参数----------Arguments----------
参数:matrix
square matrix with 1's for neighbours and NA's for non-neighbours.
1,邻居和NA的非邻居的方阵。
参数:filename
filename that the adjacency matrix file will be written to (default="Adj.txt").
的邻接矩阵将被写入文件(默认值=Adj.txt“)的文件名。
参数:suffix
string to be appended to "num", "adj" and "weights" object names
字符串将被添加到民,调整和权重对象名称
Details
详细信息----------Details----------
Adjacency matrices are used by conditional autoregressive (CAR) models to smooth estimates according to some neighbourhood map. The basic idea is that neighbouring areas have more in common than non-neighbouring areas and so will be positively correlated.
邻接矩阵的使用条件自回归模型(CAR)平滑估计,根据一些邻里图。其基本思想是,周边区域有更多的共同点比非邻近区域等呈正相关。
As well as correlations in space it is possible to use CAR models to model similarities in time.
以及相关性在空间中也能够使用CAR模型时间模型的相似。
In this case the matrix represents those time points that we wish to assume to be correlated.
在这种情况下的矩阵表示,我们希望假设以相关的那些时间点。
值----------Value----------
Creates a text file named filename that contains the total number of neighbours (num), the index number of the adjacent neighbours (adj) and the weights (weights).
创建一个文本文件名为filename包含总数的邻居(NUM),相邻的邻居的索引号(形容词)的权重(权重)。
(作者)----------Author(s)----------
Adrian Barnett <a href="mailto:a.barnett<at>qut.edu.au">a.barnett<at>qut.edu.au</a>
实例----------Examples----------
# Nearest neighbour matrix for 5 time points[最近的邻居矩阵为5个时间点]
x = c(NA,1,NA,NA,NA)
(V = toeplitz(x))
createAdj(V)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|