Questions tagged [neweywest]

A type of the coefficient variance-covariance matrix estimator used to compute robust standard errors in time series context. Please consider using the more general *robust-standard-error* tag instead of this.

Filter by
Sorted by
Tagged with
1 vote
1 answer
22 views

Neweywest test in R

Portfolio analysis is being conducted using R. We use the neweywest function belonging to the sandwich package, and the brief description is as follows. ...
user avatar
  • 11
1 vote
0 answers
96 views

Poisson regression with autocorrelated residuals

i am running a Poisson segmented regression on monthly cases following the classic format by Wagner: Wagner AK, Soumerai SB, Zhang F, Ross-Degnan D. Segmented regression analysis of interrupted time ...
user avatar
  • 131
0 votes
0 answers
21 views

Should I check if the problems(i.e. autocorrelation and heteroskedasticity) were overcome by using "NeweyWest()"?

Please help me, because I can't resolve the following problems by myself. Model: reg_lm <- lm(Y~A+B+C, data=Data1) In the above model, there are two problems to ...
user avatar
  • 1
0 votes
1 answer
175 views

Which standard errors do I use for the Fama-French three-factor model?

I am doing a linear regression with the Fama-French three-factor model with data from the stock market I built a portfolio out of. (I also use Betting Against Beta, Short Term, Long Term and Momentum ...
user avatar
2 votes
0 answers
172 views

Estimate HAC Covariance Matrix from data by hand - Newey West

Given $T$ realizations for $N$ random variables, $X\in\mathbb{R}^{N\times T}$, I want to estimate the covariance matrix of the data, $\Omega\in\mathbb{R}^{N\times N}$. The sample covariance would be $$...
user avatar
  • 323
1 vote
0 answers
136 views

Understanding Newey West corrections and t-values

I am trying to find if the Japanese market is predictable, using different market valuation variables as independent variables. I use OLS regressions on a time series, because this is done so in ...
user avatar
  • 31
1 vote
1 answer
69 views

Decision between vcovPC and vcovPL (sandwich)

I want to do a linear probability model with clustered errors. The data also has a panel structure. In the R package “sandwich,” there are two functions: vcovPC() ...
user avatar
  • 23
1 vote
0 answers
23 views

Unable to match numerical output of Newey-West standard error in statsmodel

I'm trying to implement Newey-West from scratch to better understand each component. Currently having trouble replicating a basic numerical example of Newey-West with lag=1 from ...
user avatar
  • 111
0 votes
1 answer
687 views

Statistical significance with Newey–West standard errors with a one-lag correction used

I am trying to do statistical test to prove that the returns of a certain equity are statistically significant so that I can reject the null hypothesis that the mean (of returns) is equal to 0. I have ...
user avatar
3 votes
1 answer
569 views

How are clustered standard errors and Newey-West errors related

As the question says, how are the two concepts related? As far as I understand, both approaches correct for heteroscedasticity and autocorrelation. Yet, they are different. Would applying one of the ...
user avatar
  • 860
0 votes
1 answer
100 views

Implementation of NeweyWest for Fama-MacBeth Regression

I am trying to run the following Fama-MacBeth regression and the code runs perfectly fine without the NeweyWest function. However, since the time-series is autocorrelated I need to include the ...
user avatar
1 vote
0 answers
38 views

Why different regression result with real and excess return as the dependent variable?

I want to test how granted patent, R&D & their ratio predicts real & excess market return. I am doing 2 robust linear regressions: \begin{align} \text{Real Return} \left( t + 1 \right) =...
user avatar
  • 11
1 vote
0 answers
119 views

How to decide maximum lags length in Newey West T stats [duplicate]

wI have a time series data. I run Newey-West statistics on it without mentioning lag length. It accepts null hypothesis. On the same time series when I mention max.length=50. It rejected null ...
user avatar
  • 227
1 vote
0 answers
36 views

Regarding t test (comparing investment strategies)

I have two time series. These series consists of monthly returns of two investment strategies. I want to test that whether second investment strategy significantly perform better than first one. For ...
user avatar
  • 180
1 vote
0 answers
29 views

Applying Newey-West variance estimator without a regression framework

Let's say I have a series of correlated variables $x_1, ..., x_T$. I could estimate its variance by $\sigma^2 = \frac{1}{T-1}\sum_{i=1}^T (x_i - \bar{x})^2$. However, as there is serial correlation in ...
user avatar
2 votes
1 answer
1k views

My standard errors are smaller when I use Newey-West? HELP!

I am looking at some time series regressions, When I use OLS, my standard errors on one of the coefficients is 0.002777409. When I use the Newey-West correction the standard errors are smaller: <...
user avatar
0 votes
1 answer
434 views

Is the optimal lag length for the Hansen and Hodrick and Newey West robust standard errors the same?

Is the optimal lag length for the Hansen and Hodrick and Newey West robust standard errors the same? I have read in Greene that the optimal is $T^{1/4}$ for Newey-West, is this the same for Hansen ...
user avatar
  • 1
2 votes
1 answer
375 views

R - Testing for Granger causality when OLS assumption are violated

I am using the vars package to estimate a VAR-model. Since it seems, that the residuals of my model are neither homoscedastic or uncorrelated I computed Newey West ...
user avatar
3 votes
1 answer
697 views

Error trying to calculate Newey West Standard Errors for a VAR-model in R [closed]

I estimated a VAR-model in R using the vars package and want to estimate Newey West Standard Errors using the sandwich package <...
user avatar
0 votes
0 answers
4k views

Bartlett Kernel (Newey West Covariance Matrix)

Referring to Pesaran (2015) the NW covariance matrix is computed according to the following formula: $$\hat V(\hat\beta)=\frac{1}{T}Q_T^{-1}\hat S_TQ_T^{-1}$$ (Skipping the definition of Q) $$\hat ...
user avatar
  • 860
1 vote
2 answers
2k views

Newey West estimator, application

What is the application of the Newey-West estimator of variance in case that we have the presence of autocorrelation in our model?
user avatar
  • 11
0 votes
0 answers
660 views

ARIMA OLS regression with Newey West standard errors in R

In R I am trying to run an ARIMA model rsi_model_2 <- arima(dlog_seasonal_RSI_ts, order=c(0,0,1), seasonal=c(0,0,1)) How do I make sure it uses Newey-West ...
user avatar
  • 127
17 votes
1 answer
4k views

Comparison between Newey-West (1987) and Hansen-Hodrick (1980)

Question: What are the main differences and similarities between using Newey-West (1987) and Hansen-Hodrick (1980) standard errors? In which situations should one of these be preferred over the other? ...
user avatar
  • 970
4 votes
1 answer
7k views

Replicating White's standard errors in R with the NeweyWest function

Theoretical background: White's heteroskedasticity-consistent (HC) standard errors and Newey-West's heteroskedasticity- and autocorrelation-consistent (HAC) standard errors are closely related. When ...
user avatar
  • 970
0 votes
0 answers
599 views

Different optimal bandwidths of Newey West (1994) in R and STATA

R and STATA gave very different optimal bandwidths for the same data set. It will be greatly appreciated if someone can give me any hint why this happens. Here are two sample codes from R and STATA ...
user avatar
  • 101
3 votes
1 answer
2k views

Heteroscedasticity in VAR Residuals

I got some heteroscedasticity in the residuals of a VAR model (check the plot). As fas as I know, the VAR coefficients are still consistent. However, the standard errors are supposed to be not well ...
user avatar
2 votes
1 answer
4k views

Optimal Lag for Newey West

I am currently working on my PhD thesis and was wondering how I can identify the optimal number of lags for the Newey West covariance matrix. So far, my code is ...
user avatar
2 votes
1 answer
14k views

OLS regression with Newey-West error term [closed]

I need to estimate a linear regression with the OLS method. Since I assume the error terms to be correlated, I would like to account for heteroskedasticity and autocorrelation in the error terms. I ...
user avatar
4 votes
1 answer
5k views

Does Newey-West standard errors affects the significance level of R2?

General question: I use the linear regressions with the OLS method to check whether cross-sectional standard deviation is able to describe future sumed excess returns or not. Because of ...
user avatar
  • 53
0 votes
0 answers
90 views

Newey-West like HAC estimates with non-temporal correlation structure in residuals

Let's suppose I have data with key variables country, company and year (and a load of model variables). There are many companies per country and many years of observations per company. Naturally, ...
user avatar
  • 2,095
3 votes
1 answer
2k views

Newey West Covariance in SAS and in R are different

I am using the proc autoreg procedure in SAS and the sandwich library in R to calculate Newey West covariance for a linear model....
user avatar
  • 619
8 votes
1 answer
11k views

Formula for Newey West Standard Error

Could someone please help with the formula for the Newey West standard error of $\beta_1$ (without matrix notation) for the following regression: $Y_t=\beta_0+\beta_1X_t+\epsilon_t$ where $\...
user avatar
2 votes
1 answer
1k views

Diebold-Mariano test: robust standard errors for 1-day ahead forecasts?

Diebold & Mariano suggest using Newey-West standard errors to correct for autocorrelation and heteroscedasticity in the error terms when comparing forecast accuracy. However, if I understand ...
user avatar
2 votes
0 answers
198 views

How does Newey West affect inference?

I understand that the Newey-West estimator is an approach to estimate the covariance of the linear regression estimator (OLS) when there are heteroskedasticity and autocorrelation. Should it modify ...
user avatar
  • 619
1 vote
0 answers
423 views

Correction for non-normal residuals where residuals are not correlated or show heteroskedasticity

I know the implication of non-normal residuals is uncertain statistical tests because the SEs are inefficient. Can I apply the Newey-West to calculate standardized Standard Errors for an OLS ...
user avatar
  • 11
4 votes
2 answers
16k views

How to determine the appropriate number of lags when using Newey-West (or HAC) standard errors

I have an unbalanced panel dataset where both autocorrelation and heteroskedasticity are present. I have read, in the Stata manual, that the newey command (see Newey-West, 1987) is one way in which ...
user avatar
  • 41
5 votes
1 answer
2k views

Newey-West standard errors when Durbin-Watson test results are fine

I am running a time-series regression. The Durbin-Watson statistics is very close to 2. In such a situation, would it still be better to use Newey-West standard errors, or is it ok to use OLS standard ...
user avatar
2 votes
1 answer
790 views

Newey West standard errors in regression model without constant

I'm estimating $y_i= \beta_1 \times x_{1i} + \varepsilon_i$ on a time series on $y$ and $x$, so in presence of heteroskedasticity and autocorrelation. My model does not include any intercepts. Are ...
user avatar
3 votes
1 answer
3k views

Robust OLS standard errors (Newey-West)

I am running a simple OLS regression with HAC adjustment (i.e. Heteroschedasticity and Autocorrelation adjustment) using the following function in hac() in matlab. ...
user avatar
  • 877
3 votes
2 answers
6k views

Newey-West standard errors in OLS

I am trying to compute robust coefficient estimates for OLS, using the hac() function in MATLAB (see description of function in MathWorks). In my case, I am ...
user avatar
  • 877
1 vote
0 answers
178 views

Finding the amount of error with a multiple regression formula that is determining stock returns

I'm brand new to statistics and I'm using C# and Math.Net to perform multiple regression on a formula with 3 inputs and 1 output. I was told that finding an rsquared value isn't recommended for a ...
user avatar
1 vote
0 answers
371 views

Prediction interval using predict and NeweyWest in R

I have a basic linear regression model I fitted to a time series. Unfortunately I have to account for autocorrelation and heteroskedasicity in the model and I have done so with the NeweyWest function ...
user avatar
  • 11
5 votes
0 answers
6k views

How to compute Newey West standard errors and t-statistics [closed]

I'm currently trying to use Newey-West standard errors accounting for Heteroskedasticity and Autocorrelation with the sandwich package in R, but i lack understanding as i can not fully grasp the ...
user avatar
  • 151
2 votes
1 answer
757 views

Probability as a dependent variable in a time-series regression

Are there any issues to run a Newey-West time-series regression on a dependent variable that is a probability? What are the biases that I am facing? I can't find anything online that can help me out ...
user avatar
  • 573
1 vote
0 answers
444 views

Shrinkage Estimator for Newey-West Covariance Matrix

This is a cross post. I would like to apply the Newey-West covariance estimator for portfolio optmization. Up to lag one it is given by $$ \Sigma = \Sigma(0) + \frac12 \left (\Sigma(1) + \Sigma(1)^T \...
user avatar
  • 3,236
11 votes
2 answers
12k views

Newey-West t-statistics

I have a time-series which is autocorrelated by construction, and might be heteroscedastic. I have calculated the sample mean of this time-series, and would like to calculate the t-statistic ...
user avatar
  • 443
2 votes
1 answer
2k views

Newey-West standard errors with cross-sectional OLS?

Consider the cross sectional: $Y_i = a + b X_i + e_i$ where I have reason to believe that $E[e_j e_k] \not= 0$ for a concerning number of $j\not= k$. What happens if I use a serial correlation ...
user avatar
1 vote
1 answer
2k views

Get the R2 from GMM Newey-West in SAS

I'm running a simple cross-sectional regression where I first run regressions for every year of observations and then I'm running this code to get the Newey-West corrected standard errors: ...
user avatar
  • 573
11 votes
1 answer
13k views

vcovHC, vcovHAC, NeweyWest – which function to use?

I am trying to update my lm() based model to get correct standard errors and tests. I am really confused which VC matrix to use. The sandwich package offers ...
user avatar
  • 2,075
8 votes
1 answer
6k views

How do joint test, r-squared behave when using autocorrelation / heteroskedasticity robust std. errors?

Recently we discussed on SO how to update a standard linear regression summary with NeweyWest standard errors. I used coeftestfrom the ...
user avatar
  • 2,075