similar to: Robust covariance matrix with NeweyWest()

Displaying 20 results from an estimated 800 matches similar to: "Robust covariance matrix with NeweyWest()"

2011 Jul 25
1
biglm() and NeweyWest()
Dear all, I am working on a large dataset and need to use biglm() to perform OLS regressions. I have detected significant ARCH effects 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
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
2010 Jun 27
1
NeweyWest
I want to calculate Newey West robust standard error using NeweyWest. Comparing the results to what I get in STATA, in order to get the same results in I need to specify "prewhite=0". Can someone explain what this prewhite command means? Thanks [[alternative HTML version deleted]]
2010 Oct 14
1
robust standard errors for panel data - corrigendum
Hello again Max. A correction to my response from yesterday. Things were better than they seemed. I thought it over, checked Arellano's panel book and Driscoll and Kraay (Rev. Econ. Stud. 1998) and finally realized that vcovSCC does what you want: in fact, despite being born primarily for dealing with cross-sectional correlation, 'SCC' standard errors are robust to "both
2009 Dec 10
2
Problem with coeftest using Newey West estimator
Hi, I want to calculate the t- and p-values for a linear model using the Newey West estimator. I tried this Code and it usually worked just fine: > oberlm <- lm(DYH ~ BIP + Infl + EOil, data=HU_H) > coeftest(oberlm, NeweyWest(oberlm, lag=2)) t test of coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.1509950 0.0743832 2.0300 0.179486 BIP
2010 Sep 23
1
Newey West and Singular Matrix + library(sandwich)
thank you, achim. I will try chol2inv. sandwich is a very nice package, but let me make some short suggestions. I am not a good econometrician, so I do not know what prewhitening is, and the vignette did not explain it. "?coeftest" did not work after I loaded the library. automatic bandwidth selection can be a good thing, but is not always. as to my own little function, I like the
2011 Sep 09
1
Exception in NeweyWest - Pre-Whitening necessary?
Hi guyz, I have run my algorithm in R (see http://pastebin.com/q84Tujfg) and got the following error: Error in ar.ols(x, aic = aic, order.max = order.max, na.action = na.action, : 'order.max' must be < 'n.used' I am pretty sure, that the error comes from the NeweyWest function in line 45, as the NeweyWest function uses the ar.ols() function for pre whitening. Does anyone
2010 Sep 22
1
Newey West and Singular Matrix
dear R experts: ?I am writing my own little newey-west standard error function, with heteroskedasticity and arbitrary x period autocorrelation corrections. ?including my function in this post here may help others searching for something similar. it is working quite well, except on occasion, it complains that Error in solve.default(crossprod(x.na.omitted, x.na.omitted)) : system is
2010 May 02
1
question about 2SLS
Hi All, I am using R 2.11.0 on a Ubuntu machine. I estimated a model using "tsls" from the package "sem". Is there a way to get Newey West standard errors for the parameter estimates? When estimating the model by OLS, I used "NeweyWest" from the package "sandwich" to get HAC standard errors. But, I am not able to use the same method with the results of the
2011 Aug 27
3
Exception while using NeweyWest function with doMC
Dear R users, I am using R right now for a simulation of a model that needs a lot of memory. Therefore I use the *bigmemory* package and - to make it faster - the *doMC* package. See my code posted on http://pastebin.com/dFRGdNrG Now, if I use the foreach loop with the addon %do% (for sequential run) I have no problems at all - only here and there some singularities in regressor matrices which
2008 May 22
1
How to account for autoregressive terms?
Hi, how to estimate a the following model in R: y(t)=beta0+beta1*x1(t)+beta2*x2(t)+...+beta5*x5(t)+beta6*y(t-1)+beta7*y(t-2)+beta8*y(t-3) 1) using "lm" : dates &lt;- as.Date(data.df[,1]) selection&lt;-which(dates&gt;=as.Date("1986-1-1") &amp; dates&lt;=as.Date("2007-12-31")) dep &lt;- ts(data.df[selection,c("dep")]) indep.ret1
2002 Aug 30
2
postscript() problem
Hi R-users, I am using "postscript("xx.eps", horizontal=FALSE, onefile=FALSE, height=6, width=10, pointsize=10)" and "barplot(xx.dat)" in R to produce EPS graphics for LATeX document. When checking the graphics with "gv" I see that it was not produced with full details. The main graphic is there, but axes labels and titles are missing. While checking the
2006 Aug 31
0
Moving Window regressions with corrections for Heteroscedasticity and Autocorrelations(HAC)
# Using Moving/Rolling Windows, here we do an OLS Regression with corrections for #Heteroscedasticity and Autocorrelations (HAC) using Newey West Method. This code is a #extension of Ajay Shah?s code for moving windows simple OLS regression. # The easiest way to adjust for Autocorrelations and Heteroscedasticity in the OLS residuals is to #use the coeftest function that is included in the
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
2009 Aug 25
2
how to pass user input to a function?
Hi everyone, I'm building a website (http://yourpsyche.org) using Jeffrey Horner's awesome Rapache module. I want to take user input, and pass it to an R script. At first I was simply using if else statements, but after a while I had so many nested if else's in my code that my head was spinning. So then I started using cat() and source() to write temporary files and read them back in
2004 Aug 12
0
"new" package sandwich 0.1-3
Dear useRs, here is the announcement for the next "new" package: sandwich 0.1-3. sandwich provides heteroskedasticity (and autocorrelation) 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
2004 Aug 12
0
"new" package sandwich 0.1-3
Dear useRs, here is the announcement for the next "new" package: sandwich 0.1-3. sandwich provides heteroskedasticity (and autocorrelation) 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
2011 May 18
1
strucchange package Linux help
When I run the code below on Macintosh and Windows, the plot comes out fine. However, on Linux, the png generated is invalid from R console, and loading strucchange crashes rkward. Is this a known issue on Linux and, if so, is there a workaround? Many thanks! require(strucchange) data("RealInt") bp.ri <- breakpoints(RealInt~1, h=15) summary(bp.ri) fac.ri <- breakfactor(bp.ri,
2008 Nov 20
0
A Problem while Calculating Newey-West HAC
Hi, Does anyone read Verbeek's "A Guide to Modern Econometrics"? In its Section 4.11, how does the last two equations' HAC calculate? I've tried several groups of parameters in sandwich::NeweyWest, but I still cannot get the same result. I've tried lag=2 and lag=3, as long as prewhite=FALSE and prewhite=TRUE yet, but... Sincerely Hsiao-nan Cheung
2009 Mar 10
1
HAC corrected standard errors
Hi, I have a simple linear regression for which I want to obtain HAC corrected standard errors, since I have significant serial/auto correlation in my residuals, and also potential heteroskedasticity. Would anyone be able to direct me to the function that implements this in R? It's a basic question and I'm sure I'm missing something obvious here. I looked up this post: