nbcosts(spdep)
nbcosts()所属R语言包:spdep
Compute cost of edges
计算成本的边缘
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The cost of each edge is the distance between it nodes. This function compute this distance using a data.frame with observations vector in each node.
的每一个边缘的成本是它的节点之间的距离。此功能与观测向量中的每个节点使用一个数据框计算这个距离。
用法----------Usage----------
nbcost(data, id, id.neigh, method = c("euclidean", "maximum",
"manhattan", "canberra", "binary", "minkowski", "mahalanobis"),
p = 2, cov, inverted = FALSE)
nbcosts(nb, data, method = c("euclidean", "maximum",
"manhattan", "canberra", "binary", "minkowski", "mahalanobis"),
p = 2, cov, inverted = FALSE)
参数----------Arguments----------
参数:nb
An object of nb class. See poly2nb for details.
的对象nb类。见poly2nb的详细信息。
参数:data
A matrix with observations in the nodes.
一个矩阵,观测节点。
参数:id
Node index to compute the cost
节点的索引来计算成本
参数:id.neigh
Idex of neighbours nodes of node id
IDEX的邻居节点的节点id
参数:method
Character or function to declare distance method. If method is character, method must be "mahalanobis" or "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowisk". If method is one of "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowisk", see dist for details, because this function as used to compute the distance. If method="mahalanobis", the mahalanobis distance is computed between neighbour areas. If method is a function, this function is used to compute the distance.
字符或函数的声明距离的方法。如果method是字符,方法必须是“马氏”或“欧氏”,“最大”,“曼哈顿”,“堪培拉”,“二”或“minkowisk”。如果method是一个“欧几里得”,“最大”,“曼哈顿”,“堪培拉”,“二”或“minkowisk”,dist的详细信息,因为这充当用于计算距离。如果method="mahalanobis",邻区之间的马氏距离计算。如果method是function,这个函数是用来计算距离。
参数:p
The power of the Minkowski distance.
闵可夫斯基距离的力量。
参数:cov
The covariance matrix used to compute the mahalanobis distance.
的协方差矩阵来计算马哈拉诺比斯距离。
参数:inverted
logical. If 'TRUE', 'cov' is supposed to contain the inverse of the covariance matrix.
逻辑。如果“TRUE”,覆盖应该包含的协方差矩阵的逆。
值----------Value----------
A object of nbdist class. See nbdists for details.
一个对象的nbdist类。见nbdists的详细信息。
(作者)----------Author(s)----------
Elias T. Krainski and Renato M. Assuncao
参见----------See Also----------
See Also as nbdists, nb2listw
请参见nbdists,nb2listw
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|