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

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

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

                                        Spatial weights matrix powers traces
                                         空间权重矩阵的权力痕迹

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

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

The function is used to prepare a vector of traces of powers of a spatial weights matrix
该功能用于制备向量的权力空间权重矩阵的痕迹


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


trW(W=NULL, m = 30, p = 16, type = "mult", listw=NULL, momentsSymmetry=TRUE)



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

参数:W
A spatial weights matrix in CsparseMatrix form
空间权重矩阵CsparseMatrix形式


参数:m
The number of powers; must be an even number for "type"=“moments” (default changed from 100 to 30 (2010-11-17))
的权力,必须为偶数的“类型”=“时刻”(默认值从100到30(2010-11-17))


参数:p
The number of samples used in Monte Carlo simulation of the traces if type is MC (default changed from 50 to 16 (2010-11-17))
数样品在Monte Carlo模拟的痕迹,如果是MC型(默认值从50到16(2010-11-17))


参数:type
Either “mult” (default) for powering a sparse matrix (with moderate or larger N, the matrix becomes dense, and may lead to swapping), or “MC” for Monte Carlo simulation of the traces (the first two simulated traces are replaced by their analytical equivalents), or “moments” to use the looping space saving algorithm proposed by Smirnov and Anselin (2009) - for “moments”, W must be symmetric, for row-standardised weights through a similarity transformation
无论是“多个”(默认值)供电稀疏矩阵(中等或较大的N,矩阵变得密实,可能会导致交换),或“MC”Monte Carlo模拟的痕迹(前两个模拟痕迹取代他们的分析等值),或“瞬间”使用的循环,节省空间斯米尔诺夫和Anselin(2009)提出的算法 - “瞬间”,W必须是对称的,为行标准化权重相似变换


参数:listw
a listw object, which should either be fully symmetric, or be constructed as similar to symmetric from intrinsically symmetric neighbours using similar.listw, used with "type"=“moments”
一个listw对象,这应该是完全对称的,或者建造类似对称的,从本质上对称的邻居,使用similar.listw,使用“类型”=“的时刻”


参数:momentsSymmetry
default TRUE; assert Smirnov/Anselin symmetry assumption
默认为true;断言的斯米尔诺夫/ Anselin对称假设


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

A numeric vector of m traces, with “timings” and “type” attributes; the "type"=“MC” also returns the standard deviation of the p-vector V divided by the square root of p as a measure of spread for the trace estimates.
m的痕迹,“定时”和“type”属性的type=“MC”甲数值向量也返回的p-矢量V的标准偏差的平方根除以p作为跟踪估计传播的措施。


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


Roger Bivand <a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a>



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

<h3>See Also</h3>   <code>as_dgRMatrix_listw</code>, <code>nb2listw</code>

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


example(columbus)
listw <- nb2listw(col.gal.nb)
W <- as(as_dgRMatrix_listw(listw), "CsparseMatrix")
system.time(trMat <- trW(W, type="mult"))
str(trMat)
set.seed(1100)
system.time(trMC <- trW(W, type="MC"))
str(trMC)
plot(trMat, trMC)
abline(a=0, b=1)
for(i in 3:length(trMC)) segments(trMat[i], trMC[i]-2*attr(trMC, "sd")[i], trMat[i], trMC[i]+2*attr(trMC, "sd")[i])
listwS <- similar.listw(listw)
W <- as(as(as_dgRMatrix_listw(listwS), "CsparseMatrix"), "symmetricMatrix")
system.time(trmom <- trW(W, m=24, type="moments"))
str(trmom)
all.equal(trMat[1:24], trmom, check.attributes=FALSE)
system.time(trMat <- trW(W, m=24, type="mult"))
str(trMat)
all.equal(trMat, trmom, check.attributes=FALSE)
set.seed(1)
system.time(trMC <- trW(W, m=24, type="MC"))
str(trMC)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-18 03:43 , Processed in 0.030962 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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