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

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

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

                                        Heteroskedasticity and Autocorrelation Consistent (HAC) Covariance Matrix Estimation
                                         异方差和自相关一致协方差矩阵的估计(HAC)

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

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

Heteroskedasticity and autocorrelation consistent (HAC) estimation of the covariance matrix of the coefficient estimates in a (generalized) linear regression model.
一致(HAC)异方差和自相关系数的协方差矩阵估计的(广义)线性回归模型的估计。


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


vcovHAC(x, ...)

## Default S3 method:[默认方法]
vcovHAC(x, order.by = NULL, prewhite = FALSE, weights = weightsAndrews,
  adjust = TRUE, diagnostics = FALSE, sandwich = TRUE, ar.method = "ols",
  data = list(), ...)

meatHAC(x, order.by = NULL, prewhite = FALSE, weights = weightsAndrews,
  adjust = TRUE, diagnostics = FALSE, ar.method = "ols", data = list())



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

参数:x
a fitted model object.



参数: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.
逻辑或整数。应该估计功能是prewhitened的吗?如果TRUE或大于0的VAR模型订单as.integer(prewhite)安装通过ar的方法"ols"和demean = FALSE。


参数:weights
Either a vector of weights for the autocovariances or a function to compute these weights based on x, order.by, prewhite, ar.method and data. If weights is a function it has to take these arguments. See also details.
无论是矢量的autocovariances或函数的权重,这些权重计算的基础上x,order.by,prewhite,ar.method和data。如果weights是一个函数,它把这些参数。还详细介绍了。


参数: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 below for details.
逻辑。额外的模型诊断回来了吗?有关详细信息,请参见下文。


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


参数:ar.method
character. The method argument passed to ar for prewhitening.
字符。的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 vcovHAC is called from.
一个可选的数据框包含order.by模型中的变量。默认情况下,变量是从vcovHAC被称为从环境。


参数:...
arguments passed to sandwich.
参数传递到sandwich。


Details

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

The function meatHAC is the real work horse for estimating the meat of HAC sandwich estimators – the default vcovHAC method is a wrapper calling sandwich and bread. See Zeileis (2006) for more implementation details. The theoretical background, exemplified for the linear regression model, is described in Zeileis (2004).
的功能meatHAC估计HAC三明治估计的肉是真正的工作的马 - 默认vcovHAC方法是一个包装调用sandwich和bread。具体的实现细节,请参阅Zeileis(2006)。的理论背景,例如线性回归模型,描述在Zeileis(2004年)。

Both functions construct weighted information sandwich variance estimators for parametric models fitted to time series data. These are basically constructed from weighted sums of autocovariances of the estimating functions (as extracted by estfun). The crucial step is the specification of weights: the user can either supply vcovHAC with some vector of  weights or with a function that computes these weights adaptively (based on the arguments x, order.by, prewhite and data).  Two functions for adaptively choosing weights are implemented in weightsAndrews implementing the results of Andrews (1991) and in weightsLumley implementing the results of Lumley (1999). The functions kernHAC and weave respectively are to more convenient interfaces for vcovHAC with these functions.
这两个函数构造加权信息夹心方差估计安装时间序列数据的参数化模型。这些基本建成估计函数autocovariances的(提取estfun)的加权和。关键的一步是规范的权重:用户可以提供vcovHAC一些权重向量或一个函数,计算这些权重自适应的(根据参数x,order.by, prewhite和data)。 weightsAndrews实施安德鲁斯(1991)的结果,在weightsLumley实施的结果拉姆利(1999)两个函数中实现自适应地选择重量。的功能kernHAC和weave更方便的接口,分别是vcovHAC这些功能。

Prewhitening based on VAR approximations is described as suggested in Andrews & Monahan (1992).
预白噪基于VAR近似的描述安德鲁斯&莫纳罕(1992)中所建议的。

The covariance matrix estimators have been improved by the addition of a bias correction and an approximate denominator degrees of freedom for test and confidence interval construction.
已改进的协方差矩阵估计的由另外的偏置校正和一个近似分母自由度检验和置信区间建设。


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

A matrix containing the covariance matrix estimate. If diagnostics was set to TRUE this has an attribute "diagnostics" which is a list  with
一个矩阵的协方差矩阵的估计。如果diagnostics设置为TRUE属性"diagnostics"这是一个列表


参数:bias.correction
multiplicative bias correction
乘偏置校正


参数:df
Approximate denominator degrees of freedom
约分母自由度


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

Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimation. Econometrica, 59, 817–858.
An Improved Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimator. Econometrica, 60, 953–966.
Weighted Empirical Adaptive Variance Estimators for Correlated Data Regression. Journal of the Royal Statistical Society B, 61, 459–477.
A Simple, Positive Semi-Definite, Heteroskedasticity and Autocorrelation Consistent Covariance Matrix. Econometrica, 55, 703–708.
Econometric Computing with HC and HAC Covariance Matrix Estimators. Journal of Statistical Software, 11(10), 1–17. URL http://www.jstatsoft.org/v11/i10/.  
Object-oriented Computation of Sandwich Estimators. Journal of Statistical Software, 16(9), 1–16. URL http://www.jstatsoft.org/v16/i09/.

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

weightsLumley, weightsAndrews,
weightsLumley,weightsAndrews,


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


x <- sin(1:100)
y <- 1 + x + rnorm(100)
fm <- lm(y ~ x)
vcovHAC(fm)
vcov(fm)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-29 11:37 , Processed in 0.026596 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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