lm.LMtests(spdep)
lm.LMtests()所属R语言包:spdep
Lagrange Multiplier diagnostics for spatial dependence in linear models
Lagrange乘子的空间依赖于线性模型的诊断
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The function reports the estimates of tests chosen among five statistics for testing for spatial dependence in linear models. The statistics are the simple LM test for error dependence (LMerr), the simple LM test for a missing spatially lagged dependent variable (LMlag), variants of these robust to the presence of the other (RLMerr, RLMlag - RLMerr tests for error dependence in the possible presence of a missing lagged dependent variable, RLMlag the other way round), and a portmanteau test (SARMA, in fact LMerr + RLMlag). Note: from spdep 0.3-32, the value of the weights matrix trace term is returned correctly for both underlying symmetric and asymmetric neighbour lists, before 0.3-32, the value was wrong for listw objects based on asymmetric neighbour lists, such as k-nearest neighbours (thanks to Luc Anselin for finding the bug).
该功能估计在五个统计选择的空间依赖于线性模型进行测试的测试报告。统计数据的错误依赖简单的LM测试(LMerr),一个缺少的空间滞后因的变量(LMlag)的简单的LM测试,在场的其他(RLMerr,RLMlag - RLMerr测试中的错误依赖这些强大的变种可能存在的缺失滞后因变量,反过来RLMlag),和一个混成的测试(SARMA,在其实LMerr + RLMlag)。注:0.3-32之前,从spdep 0.3-32,返回正确的值的权重矩阵迹术语两个基本对称和非对称的邻居列表,该值是错误的,不对称的邻居列表的基础上listw对象,如k-最近的邻居(吕克Anselin发现bug)。
用法----------Usage----------
lm.LMtests(model, listw, zero.policy=NULL, test="LMerr", spChk=NULL, naSubset=TRUE)
## S3 method for class 'LMtestlist'
print(x, ...)
## S3 method for class 'LMtestlist'
summary(object, p.adjust.method="none", ...)
## S3 method for class 'LMtestlist.summary'
print(x, digits=max(3, getOption("digits") - 2), ...)
参数----------Arguments----------
参数:model
an object of class lm returned by lm, or optionally a vector of externally calculated residuals (run though na.omit if any NAs present) for use when only "LMerr" is chosen; weights and offsets should not be used in the lm object
类的一个对象lmlm,或可选的外部计算残差向量的(运行虽然返回na.omit如果存在任何NAS)使用时,仅“LMerr”的选择;权重和偏移量不应该使用在lm对象
参数:listw
a listw object created for example by nb2listw, expected to be row-standardised (W-style)
一个listwnb2listw创建的对象,例如,预计将行标准(W型)
参数:zero.policy
default NULL, use global option value; if TRUE assign zero to the lagged value of zones without neighbours, if FALSE assign NA
默认为空,请使用全局选项的值,如果真没有邻居的滞后值的区域分配了零,如果为FALSE分配NA
参数:test
a character vector of tests requested chosen from LMerr, LMlag, RLMerr, RLMlag, SARMA; test="all" computes all the tests.
测试要求选择从LMerr,LMlag,RLMerr,RLMlag,SARMA字符向量测试=“所有”计算所有测试。
参数:spChk
should the data vector names be checked against the spatial objects for identity integrity, TRUE, or FALSE, default NULL to use get.spChkOption()
应的数据向量空间对象的名称进行核对身份完整性,TRUE,否则返回FALSE,默认为空,使用get.spChkOption()
参数:naSubset
default TRUE to subset listw object for omitted observations in model object (this is a change from earlier behaviour, when the model$na.action component was ignored, and the listw object had to be subsetted by hand)
默认TRUE的子集listw对象省略观测对象模型(这是一个变化,从早期的行为,model$na.action部分被忽略时,和的listw对象子集的手)
参数:x, object
object to be printed
反对要打印
参数:p.adjust.method
a character string specifying the probability value adjustment (see p.adjust) for multiple tests, default "none"
一个字符串指定的概率值调整(见p.adjust)的多个测试,默认为“无”
参数:digits
minimum number of significant digits to be used for most numbers
最低数量的重要的数字,用于大部分的数字
参数:...
printing arguments to be passed through
打印参数通过
Details
详细信息----------Details----------
The two types of dependence are for spatial lag rho and spatial error lambda:
这两种类型的依赖为空间滞后rho和空间误差lambda:
where e is a well-behaved, uncorrelated error term. Tests for a missing spatially lagged dependent variable test that rho = 0, tests for spatial autocorrelation of the error u test whether lambda = 0. W is a spatial weights matrix; for the tests used here they are identical.
e是一个乖巧的,不相关的误差项。丢失的空间滞后因变量测试,测试rho = 0的空间自相关的错误u测试,测试是否lambda = 0。 W是一个空间权重矩阵,这里使用的测试,它们是相同的。
值----------Value----------
A list of class LMtestlist of htest objects, each with:
类LMtestlisthtest对象,每个列表:
参数:statistic
the value of the Lagrange Multiplier test.
值的拉格朗日乘数检验。
参数:parameter
number of degrees of freedom
自由度的数目
参数:p.value
the p-value of the test.
的p值的测试。
参数:method
a character string giving the method used.
一个字符串提供的方法使用。
参数:data.name
a character string giving the name(s) of the data.
给予(s)的数据的名称的字符串。
(作者)----------Author(s)----------
Roger Bivand <a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a> and Andrew Bernat
参考文献----------References----------
models. (Dordrecht: Kluwer); Anselin, L., Bera, A. K., Florax, R. and Yoon, M. J. 1996 Simple diagnostic tests for spatial dependence. Regional
参见----------See Also----------
lm
lm
实例----------Examples----------
data(oldcol)
oldcrime.lm <- lm(CRIME ~ HOVAL + INC, data = COL.OLD)
summary(oldcrime.lm)
res <- lm.LMtests(oldcrime.lm, nb2listw(COL.nb), test=c("LMerr", "LMlag",
"RLMerr", "RLMlag", "SARMA"))
summary(res)
lm.LMtests(oldcrime.lm, nb2listw(COL.nb))
lm.LMtests(residuals(oldcrime.lm), nb2listw(COL.nb))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|