search for: vcovhac

Displaying 17 results from an estimated 17 matches for "vcovhac".

2007 Feb 19
1
Urgent: How to obtain the Consistent Standard Errors after apply 2SLS through tsls() from sem or systemfit("2SLS") without this error message !!!!!!!!!!!!!
...;-list(RS) Reg2SLS <- systemfit("2SLS", system, labels, Inst, saveMemory=TRUE) summary (Reg2SLS) If I try to obtain the HCSE with robcov I obtain the following error message in both cases: Error in rep.default(1, p) : rep() incorrect type for second argument If I tried to apply vcovHAC or vcovHC in the systemfit output of 2SLS I receive the following messages of errors respectively: Error in estfun(x) : no applicable method for "estfun" (for vcovHAC) Error in terms.default(object) : no terms component (for vcovHC) If somebody can help me to solve this problem I...
2004 Aug 12
0
"new" package sandwich 0.1-3
...utocorrelation) consistent covariance matrix estimators (also called HC and HAC estimators). The former are implemented in the function vcovHC() (which was available in strucchange before - and independently in hccm() in John Fox's car package). And the latter are implemented in the function vcovHAC(). This implements sandwich-type estimators in a rather flexible way, allowing for user-defined weights or weight functions. It builds on some of the functionality which was before available in Thomas Lumley's weave package (not on CRAN). In particular it makes available the class of WEAVE es...
2004 Aug 12
0
"new" package sandwich 0.1-3
...utocorrelation) consistent covariance matrix estimators (also called HC and HAC estimators). The former are implemented in the function vcovHC() (which was available in strucchange before - and independently in hccm() in John Fox's car package). And the latter are implemented in the function vcovHAC(). This implements sandwich-type estimators in a rather flexible way, allowing for user-defined weights or weight functions. It builds on some of the functionality which was before available in Thomas Lumley's weave package (not on CRAN). In particular it makes available the class of WEAVE es...
2009 Dec 08
1
Serial Correlation in panel data regression
...mula(paste("lgaspcar ~", rhs)), data=Gasoline) ###Now I want to find the autocorrelation,heteroskedasticity adjusted standard errors as a part of coeftest ### Basically I would like to take care of the within country serial correlaion ###that is I want to do coeftest(m1, vcov=function(x) vcovHAC(x,order.by=...)) Please suggest what should be the argument of order.by and whether that will give me the desired result [[alternative HTML version deleted]]
2010 Mar 06
1
Robust SE for lrm object
I'm trying to obtain the robust standard errors for a multinomial ordered logit model: mod6 <- lrm(wdlshea ~ initdesch + concap + capasst + qualrat + terrain,data=full2) The model is fine but when I try to get the RSE I get an error. coeftest(mod6, vcov = vcovHAC(mod6)) Error in match.arg(type) : 'arg' should be one of “ordinary”, “score”, “score.binary”, “pearson”, “deviance”, “pseudo.dep”, “partial”, ........etc. I'm a novice R user and am not sure how to address this problem. I have also tried to use alternatives (zelig, polr) but ha...
2010 Oct 14
1
robust standard errors for panel data - corrigendum
...o go to have robustness along the "big" dimension is some sort of nonparametric truncation. So: ** 1st (possible) solution ** In my opinion, you would actually need a panel implementation of Newey-West, which is not implemented in 'plm' yet. It might well be feasible by applying vcovHAC{sandwich} to the time-demeaned data but I'm not sure; in this case, vcovHAC should be applied this way (here: the famous Munnell data, see example(plm)) > library(plm) > fm<-log(gsp)~log(pcap)+log(pc)+log(emp)+unemp > data(Produc) > ## est. FE model > femod<-plm(fm, Produ...
2009 Mar 03
2
latex output of regressions with standardized regression coefficients and t-statistics based on Huber-White
...ld be one big table for several regressions with this data (and N, R^2). I found the mtable package, which does what I need for lm(...) regressions, lm.beta to output standardized coefficients and package "sandwich" to output the corrected t-statistics (using "coeftest(x, vcov = vcovHAC(x))"). What I couldn't figure out how to put that all together, so that I get a latex table with standardized regression coefficients and corrected t-statistics based on H-W sandwich. Is there a way to get this in R and if yes: how? Thanks in advance, Jan -- jasc at gmx.net
2009 Jun 26
1
Heteroskedasticity and Autocorrelation in SemiPar package
Hi all, Does anyone know how to report heteroskedasticity and autocorrelation-consistent standard errors when using the "spm" command in SemiPar package? Suppose the original command is sp1<-spm(y~x1+x2+f(x3), random=~1,group=id) Any suggestion would be greatly appreciated. Thanks, Susan [[alternative HTML version deleted]]
2010 Dec 27
0
Heteroskedasticity and autocorrelation of residuals
...ite test) and residuals autocorrelation (using Durbin Watson test). Ultimately, this model being meant to be used for predictions, I would like to be able to remove this heteroskedasticity and residuals autocorrelation. What I've done until now : - I've used the sandwich package (function vcovHAC) with the coeftest function and I was able to compute correct standard deviations of my coefficient estimations. However, the coefficients remain the same. Only the standard deviation change. And what I'm looking for is actually a way to obtain a new set of coefficients. - I've tried anoth...
2011 Feb 16
1
VAR with HAC
Hello, I would like to estimate a VAR model with HAC corrected standard errors. I tried to do this by using the sandwich package, for example: > library(vars) > data(Canada) > myvar = VAR(Canada, p = 2, type = "const") > coeftest(myvar, vcov = vcovHAC) Error in umat - res : non-conformable arrays Which suggests that this function is not compatible with the VAR command. Has anyone tried to modify the code to get HAC corrected standard errors with VAR? Any suggestions are welcome. Thank you. Marta [[alternative HTML version deleted]]
2011 Sep 28
1
Robust covariance matrix with NeweyWest()
...a robust covariance matrix of two series of realizations of random variables: ###Begin Example### data <- cbind(rnorm(100), rnorm(100)) model <- lm(data ~ 1) vcov(model) library(sandwich) NeweyWest(model) #produces an error ###End Example### NeweyWest() produces an error but sandwich(), vcovHAC(), kernHAC, weave(),... do not produce any errors. It seems that the model object does not fit in that special case. Nevertheless, the problem is that I need the robust version of the covariance matrix according to Newey and West (1987, 1994). Any ideas or suggestions to solve the problem? Kind...
2005 Jul 22
1
time series and regions of change
Preface: this is a statistical question more than an R question. I have a vector of numbers (assume a regular time series). Within this time series, I have a set of regions of interest (all of different lengths) that I want to compare against a "baseline" (which is known). There is some autocorrelation involved. I would like to determine the "significance" of the
2006 Dec 24
1
extend summary.lm for hccm?
dear R experts: I wonder whether it is possible to extend the summary method for the lm function, so that it uses an option "hccm" (well, model "hc0"). In my line of work, it is pretty much required in reporting of almost all linear regressions these days, which means that it would be very nice not to have to manually library car, then sqrt the diagonal, and recompute
2010 Oct 13
1
robust standard errors for panel data
Hi, I would like to estimate a panel model (small N large T, fixed effects), but would need "robust" standard errors for that. In particular, I am worried about potential serial correlation for a given individual (not so much about correlation in the cross section). >From the documentation, it looks as if the vcovHC that comes with plm does not seem to do autocorrelation, and the
2011 Jul 25
1
biglm() and NeweyWest()
...which I try to account for using the Newey-West correction. So far, I have worked with NeweyWest() in the sandwich package. NeweyWest() however seems to be unable to handle an object of class "biglm". Looking into the code, I figured out that NeweyWest() calls i) bwNeweyWest() and ii) vcovHAC(), and that both of these functions use estfun(x)... which is unable to handle the object. I tried: est <- biglm(y~x1+x2,...) res <- y - predict(est,...) estfun<-function(res,x1,x2){ return(res*cbind(1,x1,x2)) } ...but NeweyWest() still did not work. Is there a way to work around this...
2010 Oct 15
0
nomianl response model
...ent version. In principle, everything in "sandwich" is object-oriented now, see vignette("sandwich-OOP", package = "sandwich") However, the methods within "sandwich" are only sensible for cross-sectional data (vcovHC, sandwich, ...) or time series data (vcovHAC, NeweyWest, kernHAC, ...). There is not yet explicit support for panel data. hth, Z > How can I estimate the model and get robust standard errors? > > Thanks for your help. > > Max > > ______________________________________________ > R-help at r-project.org mailing list...
2011 Jan 22
0
how to call BayesX in R to see the graph
...th HC and HAC Covariance >>> Matrix Estimators. _Journal of Statistical Software_, *11*(10), >>> 1-17. URL <URL: http://www.jstatsoft.org/v11/i10/>. >> >> I will look into that. >> >> Thanks, >> Mojo >> >> If I were to use vcovHAC instead of vcovHC, does that correct for serial correlation as well as Heteroskedasticity? Thanks, Mojo ------------------------------ Message: 31 Date: Fri, 21 Jan 2011 16:20:15 +0100 (CET) From: Achim Zeileis <Achim.Zeileis@uibk.ac.at> To: Mojo <mojo@sispyrc.com> Cc: r-help@r-pro...