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

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

[复制链接]
发表于 2012-9-29 22:13:41 | 显示全部楼层 |阅读模式
NeweyWest(sandwich)
NeweyWest()所属R语言包:sandwich

                                        Newey-West HAC Covariance Matrix Estimation
                                         纽维西HAC协方差矩阵的估计

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

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

A set of functions implementing the Newey & West (1987, 1994) heteroskedasticity and autocorrelation consistent (HAC) covariance matrix estimators.
一组实施纽维西(1987年,1994年)的异方差和自相关一致协方差矩阵的估计(HAC)的功能。


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


NeweyWest(x, lag = NULL, order.by = NULL, prewhite = TRUE, adjust = FALSE,
  diagnostics = FALSE, sandwich = TRUE, ar.method = "ols", data = list(),
  verbose = FALSE)

bwNeweyWest(x, order.by = NULL, kernel = c("Bartlett", "Parzen",
  "Quadratic Spectral", "Truncated", "Tukey-Hanning"), weights = NULL,
  prewhite = 1, ar.method = "ols", data = list(), ...)



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

参数:x
a fitted model object.
拟合模型对象。


参数:lag
integer specifying the maximum lag with positive  weight for the Newey-West estimator. If set to NULL floor(bwNeweyWest(x, ...)) is used.
整数指定的最高滞后,重量为正,纽维方估计。如果设置为NULLfloor(bwNeweyWest(x, ...))使用。


参数:order.by
Either a vector z or a formula with a single explanatory variable like ~ z. The observations in the model are ordered by the size of z. If set to NULL (the default) the observations are assumed to be ordered (e.g., a time series).
无论是向量z或用一个公式解释变量,如~ z。在模型中的观测是有序的的大小z。如果设置为NULL(默认值)观测值进行排序(例如,时间序列)。


参数:prewhite
logical or integer. Should the estimating functions be prewhitened? If TRUE or greater than 0 a VAR model of order as.integer(prewhite) is fitted via ar with method "ols" and demean = FALSE. The default is to use VAR(1) prewhitening.
逻辑或整数。应该估计功能是prewhitened的吗?如果TRUE或大于0的VAR模型订单as.integer(prewhite)安装通过ar的方法"ols"和demean = FALSE。默认情况下是使用VAR(1)prewhitening。


参数:kernel
a character specifying the kernel used. All kernels used are described in Andrews (1991). bwNeweyWest can only compute bandwidths for "Bartlett", "Parzen" and "Quadratic Spectral".
用字符指定内核。安德鲁斯(1991年)中描述的所有内核使用的。 bwNeweyWest只能计算的带宽"Bartlett","Parzen"和"Quadratic Spectral"。


参数:adjust
logical. Should a finite sample adjustment be made? This amounts to multiplication with n/(n-k) where n is the number of observations and k the number of estimated parameters.
逻辑。如果一个有限的样本调整呢?这相当于乘法n/(n-k)其中n是一些意见和k估计参数的数量。


参数:diagnostics
logical. Should additional model diagnostics be returned? See vcovHAC for details.
逻辑。额外的模型诊断回来了吗?见vcovHAC的详细信息。


参数:sandwich
logical. Should the sandwich estimator be computed? If set to FALSE only the middle matrix is returned.
逻辑。三明治估计计算?如果设置为FALSE只有中间的矩阵将被返回。


参数:ar.method
character. The method argument passed to ar for prewhitening (only, not for bandwidth selection).
字符。 method参数传递给ar(prewhitening,而不是带宽选择)。


参数:data
an optional data frame containing the variables in the order.by  model. By default the variables are taken from the environment which the function is called from.
一个可选的数据框包含order.by模型中的变量。默认情况下,变量的环境中,该函数的调用。


参数:verbose
logical. Should the lag truncation parameter used be printed?
逻辑。的滞后截断参数进行打印呢?


参数:weights
numeric. A vector of weights used for weighting the estimated coefficients of the approximation model (as specified by approx). By default all weights are 1 except that for the intercept term (if there is more than one variable).
数字。一个用于加权的权重向量的近似模型的估计系数(指定的approx)。缺省情况下,所有的权重是1除了截距项(如果有一个以上的变量)。


参数:...
currently not used.
目前未使用。


Details

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

NeweyWest is a convenience interface to vcovHAC using  Bartlett kernel weights as described in Newey & West (1987, 1994). The automatic bandwidth selection procedure described in Newey & West (1994) is used as the default and can also be supplied to kernHAC for the Parzen and quadratic spectral kernel. It is implemented in bwNeweyWest which does not truncate its results - if the results for the Parzen and Bartlett kernels should be truncated, this has to be applied afterwards. For Bartlett  weights this is implemented in NeweyWest.
NeweyWest到vcovHAC使用巴特利特粒重,在纽维与西方的(1987年,1994年),是一个方便的接口。纽维西(1994年)中描述的程序自动带宽选择作为默认的,也可以提供给kernHACParzen窗和二次频谱内核。这是实施bwNeweyWest不截断它的结果 - 如果被截断的结果Parzen窗和Bartlett内核,这已被应用之后。巴特利特的权重,这是实施NeweyWest。

To obtain the estimator described in Newey & West (1987), prewhitening has to be suppressed.
为了获得,在纽维西(1987)估计,prewhitening被抑制。


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

NeweyWest returns the same type of object as vcovHAC which is typically just the covariance matrix.
NeweyWest返回相同类型的对象作为vcovHAC这是典型的协方差矩阵。

bwNeweyWest returns the selected bandwidth parameter.
bwNeweyWest返回选定的带宽参数。


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

Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimation. Econometrica, 59, 817–858.
A Simple, Positive Semi-Definite, Heteroskedasticity and Autocorrelation Consistent Covariance Matrix. Econometrica, 55, 703–708.
Automatic Lag Selection in Covariance Matrix Estimation. Review of Economic Studies, 61, 631–653.
Econometric Computing with HC and HAC Covariance Matrix Estimators. Journal of Statistical Software, 11(10), 1–17. URL http://www.jstatsoft.org/v11/i10/.

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

vcovHAC, weightsAndrews,
vcovHAC,weightsAndrews,


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


## fit investment equation[适合投资方程]
data(Investment)
fm <- lm(RealInv ~ RealGNP + RealInt, data = Investment)

## Newey &amp; West (1994) compute this type of estimator[#纽维西(1994年)计算这种类型的估计]
NeweyWest(fm)

## The Newey &amp; West (1987) estimator requires specification[#纽维及西(1987)估计需要规范]
## of the lag and suppression of prewhitening[的滞后和抑制prewhitening的]
NeweyWest(fm, lag = 4, prewhite = FALSE)

## bwNeweyWest() can also be passed to kernHAC(), e.g.[:#bwNeweyWest()也可以传递到kernHAC,(),例如]
## for the quadratic spectral kernel[#二次谱内核]
kernHAC(fm, bw = bwNeweyWest)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-29 11:59 , Processed in 0.023432 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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