stsls(spdep)
stsls()所属R语言包:spdep
Generalized spatial two stage least squares
广义空间两阶段最小二乘法
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The function fits a spatial lag model by two stage least squares, with the option of adjusting the results for heteroskedasticity.
该功能适合空间滞后模型的两阶段最小二乘法,异方差性调整的结果的选项。
用法----------Usage----------
stsls(formula, data = list(), listw, zero.policy = NULL,
na.action = na.fail, robust = FALSE, HC=NULL, legacy=FALSE, W2X = TRUE)
参数----------Arguments----------
参数:formula
a symbolic description of the model to be fit. The details of model specification are given for lm()
一个象征性的模型来描述是合适的。型号规格的细节给予lm()
参数:data
an optional data frame containing the variables in the model. By default the variables are taken from the environment which the function is called.
一个可选的数据框包含在模型中的变量。默认情况下,变量的环境,被调用的函数。
参数:listw
a listw object created for example by nb2listw
例如创建一个listw对象的nb2listw
参数:zero.policy
default NULL, use global option value; if TRUE assign zero to the lagged value of zones without neighbours, if FALSE (default) assign NA - causing lagsarlm() to terminate with an error
默认为空,请使用全局选项的值,如果是TRUE分配了零的滞后值的区域没有邻居,如果为FALSE(默认值)指定NA - 导致lagsarlm()终止错误
参数:na.action
a function (default na.fail), can also be na.omit or na.exclude with consequences for residuals and fitted values - in these cases the weights list will be subsetted to remove NAs in the data. It may be necessary to set zero.policy to TRUE because this subsetting may create no-neighbour observations. Note that only weights lists created without using the glist argument to nb2listw may be subsetted.
一个函数(默认na.fail),也可以是na.omit或na.exclude残差和拟合值与后果 - 在这些情况下,将子集的权重列表中删除NAS的数据。这可能是必要的设置为TRUE zero.policy子集,因为这可能创建没有邻居观测。需要注意的是只重列表创建时没有使用的glist的参数nb2listw可能是子集。
参数:robust
default FALSE, if TRUE, apply a heteroskedasticity correction to the coefficients covariances
默认是false,如果为TRUE,应用异方差校正系数,协方差
参数:HC
default NULL, if robust is TRUE, assigned “HC0”, may take values “HC0” or “HC1” for White estimates or MacKinnon-White estimates respectively
默认NULL,如果robust是TRUE,分配“HC0”,可能需要值的HC0“”盐酸“白色的估计或麦金农白估计分别为
参数:legacy
the argument chooses between two implementations of the robustness correction: default FALSE - use the estimate of Omega only in the White consistent estimator of the variance-covariance matrix, if TRUE, use the original implementation which runs a GLS using the estimate of Omega, and yields different coefficient estimates as well - see example below
参数之间进行选择两种实现方式的稳健性修正:默认为false - 使用估计只有欧米茄在白宫一致估计的方差 - 协方差矩阵,如果为TRUE,使用原来的执行运行GLS使用的估计欧米茄,产生不同的系数估计值,以及 - 看下面的例子
参数:W2X
default TRUE, if FALSE only WX are used as instruments in the spatial two stage least squares; until release 0.4-60, only WX were used - see example below
默认TRUE,FALSE只有WX使用的工具在空间两阶段最小二乘,直到发布0.4-60,只有WX - 见下面的例子
Details
详细信息----------Details----------
The fitting implementation fits a spatial lag model:
空间滞后模型的拟合实现适合:
by using spatially lagged X variables as instruments for the spatially lagged dependent variable.
通过使用空间滞后变量X的空间滞后因变量的工具。
值----------Value----------
an object of class "stsls" containing:
对象类“stsls”包含:
参数:coefficients
coefficient estimates
系数估计值
参数:var
coefficient covariance matrix
系数的协方差矩阵
参数:sse
sum of squared errors
误差平方和
参数:residuals
model residuals
模型残差
参数:df
degrees of freedom
自由度
(作者)----------Author(s)----------
Luc Anselin, Gianfranco Piras and Roger Bivand
参考文献----------References----------
stage least squares procedure for estimating a spatial autoregressive model with autoregressive disturbances. Journal of Real Estate
参见----------See Also----------
lagsarlm
lagsarlm
实例----------Examples----------
data(oldcol)
COL.lag.eig <- lagsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, nb2listw(COL.nb))
summary(COL.lag.eig, correlation=TRUE)
COL.lag.stsls <- stsls(CRIME ~ INC + HOVAL, data=COL.OLD, nb2listw(COL.nb))
summary(COL.lag.stsls, correlation=TRUE)
COL.lag.stslsW <- stsls(CRIME ~ INC + HOVAL, data=COL.OLD, nb2listw(COL.nb), W2X=FALSE)
summary(COL.lag.stslsW, correlation=TRUE)
COL.lag.stslsR <- stsls(CRIME ~ INC + HOVAL, data=COL.OLD, nb2listw(COL.nb),
robust=TRUE, W2X=FALSE)
summary(COL.lag.stslsR, correlation=TRUE)
COL.lag.stslsRl <- stsls(CRIME ~ INC + HOVAL, data=COL.OLD, nb2listw(COL.nb),
robust=TRUE, legacy=TRUE, W2X=FALSE)
summary(COL.lag.stslsRl, correlation=TRUE)
data(boston)
gp2a <- stsls(log(CMEDV) ~ CRIM + ZN + INDUS + CHAS + I(NOX^2) + I(RM^2) +
AGE + log(DIS) + log(RAD) + TAX + PTRATIO + B + log(LSTAT),
data=boston.c, nb2listw(boston.soi))
summary(gp2a)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|