找回密码
 注册
查看: 351|回复: 0

R语言 spdep包 skater()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 14:44:41 | 显示全部楼层 |阅读模式
skater(spdep)
skater()所属R语言包:spdep

                                        Spatial 'K'luster Analysis by Tree Edge Removal
                                         树边去除空间Kluster分析

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

This function implements a SKATER procedure for spatial clustering analysis. This procedure essentialy begins with an edges set, a data set and a number of cuts. The output is an object of 'skater' class and is valid for input again.
此功能实现了SKATER空间聚类分析的过程。本质上,此过程开始边缘与集,一个数据集和一个数削减。输出是一个“速滑运动员的类的对象,并重新输入是有效的。


用法----------Usage----------


skater(edges, data, ncuts, crit, vec.crit, method = c("euclidean",
    "maximum", "manhattan", "canberra", "binary", "minkowski",
    "mahalanobis"), p = 2, cov, inverted = FALSE)



参数----------Arguments----------

参数:edges
A matrix with 2 colums with each row is an edge
用2 colums与每一行的矩阵是一个边缘


参数:data
A data.frame with data observed over nodes.
数据框节点观察到的数据。


参数:ncuts
The number of cuts
切口的数目


参数:crit
A numeric or integer with criteria for groups. Example: minimum population size.
数值或整组的标准。例:最低人口规模。


参数:vec.crit
A vector for evaluating critera.
一个向量评估判据。


参数: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”,覆盖应该包含的协方差矩阵的逆。


Details

详细信息----------Details----------

to do



值----------Value----------

A object of skater class with:
一个对象,skater类:


参数:groups
A vector with length equal the number of nodes. Each position identifies the group of node  
一种向量,与长度等于节点的数目。每个位置标识该组的节点


参数:edges.groups
A list of length equal the number of groups with each element is a set of edges  
的列表的长度等于与每个元素的组的数目是一组边


参数:not.prune
A vector identifying the groups with are not candidates to partition.
一个向量确定的群体,是不适合进行分区。


参数:candidates
A vector identifying the groups with are candidates to partition.  
一个向量确定的群体是分区的候选人。


参数:ssto
The total dissimilarity in each step of edge removal.
总相异去除的边缘中的每个步骤。


(作者)----------Author(s)----------


Renato M. Assuncao and Elias T. Krainski



参考文献----------References----------

conglomerados espaciais via arvore geradora minima. Revista Brasileira de Estatistica, 62, 1-23.
C. (2006). Efficient regionalization techniques for socio-economic geographical units using minimum spanning trees. International Journal of Geographical Information Science Vol. 20, No. 7, August 2006, 797-811

参见----------See Also----------

See Also as mstree
此外,mstree


实例----------Examples----------


### loading data[##加载数据]
bh <- readShapePoly(system.file("etc/shapes/bhicv.shp",
      package="spdep")[1])
### data standardized [##数据标准化]
dpad <- data.frame(scale(bh@data[,5:8]))

### neighboorhod list[##neighboorhod列表]
bh.nb <- poly2nb(bh)

### calculating costs[##计算成本]
lcosts <- nbcosts(bh.nb, dpad)

### making listw[##制造listw的]
nb.w <- nb2listw(bh.nb, lcosts, style="B")

### find a minimum spanning tree[##找到的最小生成树]
mst.bh <- mstree(nb.w,5)

### the mstree plot[##的mstree的图]
par(mar=c(0,0,0,0))
plot(mst.bh, coordinates(bh), col=2,      
     cex.lab=.7, cex.circles=0.035, fg="blue")
plot(bh, border=gray(.5), add=TRUE)

### three groups with no restriction[##三组与没有限制]
res1 <- skater(mst.bh[,1:2], dpad, 2)

### thee groups with minimum population [##你的人口与最低组]
res2 <- skater(mst.bh[,1:2], dpad, 2, 200000, bh@data$Pop)

### thee groups with minimun number of areas[##你减到最少的区域组]
res3 <- skater(mst.bh[,1:2], dpad, 2, 3, rep(1,nrow(bh@data)))

### groups frequency[##组频率]
table(res1$groups)
table(res2$groups)
table(res3$groups)

### the skater plot[##溜冰者图]
par(mar=c(0,0,0,0))
plot(res1, coordinates(bh), cex.circles=0.035, cex.lab=.7)

### more one partition[##一个分区]
res1b <- skater(res1, dpad, 1)

### length groups frequency[##长组频率]
table(res1$groups)
table(res1b$groups)

### the skater plot, using other colors[##溜冰者的图,使用其他颜色]
plot(res1b, coordinates(bh), cex.circles=0.035, cex.lab=.7,
     groups.colors=colors()[(1:length(res1b$ed))*10])

### the Spatial Polygons plot[空间的多边形图##]
plot(bh, col=heat.colors(4)[res1b$groups])


转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-18 06:15 , Processed in 0.021735 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表