similar to: NeweyWest

Displaying 20 results from an estimated 200 matches similar to: "NeweyWest"

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
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
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
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
2011 Sep 28
1
Robust covariance matrix with NeweyWest()
Dear R-users, I would like to compute 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
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
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
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
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
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
2024 Feb 23
2
help - Package: stats - function ar.ols
Hello, Thanks for the reply Rui and for pointing out that I forgot to attach my code. Please find attached in this email my code and data. Thanks in advance. Best regards, Pedro Gerhardt Gavronski. On Fri, Feb 23, 2024 at 5:50?AM Rui Barradas <ruipbarradas at sapo.pt> wrote: > > ?s 16:34 de 22/02/2024, Pedro Gavronski. escreveu: > > Hello, > > > > My name is Pedro
2005 Oct 31
1
how to optimise cross-correlation plot to study time lag between time-series?
Dear R-help, How could a cross-correlation plot be optimized such that the relationship between seasonal time-series can be studied? We are working with strong seasonal time-series and derived a cross-correlation plot to study the relationship between time-series. The seasonal variation however strongly influences the cross-correlation plot and the plot seems to be ?rather? symmetrical (max
2024 Feb 22
1
help - Package: stats - function ar.ols
Hello, My name is Pedro and it is nice to meet you all. I am having trouble understanding a message that I receive when use function ar.ols from package stats, it says that "Warning message: In ar.ols(x = dtb[2:6966, ], demean = FALSE, intercept = TRUE, prewhite = TRUE) : model order: 2 singularities in the computation of the projection matrix results are only valid up to model order 1,
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,
2024 Feb 23
1
help - Package: stats - function ar.ols
?s 16:34 de 22/02/2024, Pedro Gavronski. escreveu: > Hello, > > My name is Pedro and it is nice to meet you all. I am having trouble > understanding a message that I receive when use function ar.ols from > package stats, it says that "Warning message: > In ar.ols(x = dtb[2:6966, ], demean = FALSE, intercept = TRUE, > prewhite = TRUE) : > model order: 2
2024 Feb 23
1
help - Package: stats - function ar.ols
The data came through fine, the program was a miss. Can you paste the program into a ".txt" document like a notepad file and send that? You could also paste it into your email IF your email is configured to send text and NOT html. TIm -----Original Message----- From: R-help <r-help-bounces at r-project.org> On Behalf Of Pedro Gavronski. Sent: Friday, February 23, 2024 5:00 AM To:
2010 Jun 07
1
prewhiten
HI all., I have some univariate time series that need to be prewhitened. HOw this can be performed in R. I am thinking of to fit an ARIMA model and substract this from the original series. Is this the correct way THanks in advance nuncio -- Nuncio.M Research Scientist National Center for Antarctic and Ocean research Head land Sada Vasco da Gamma Goa-403804 [[alternative HTML version deleted]]
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 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
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