similar to: A Problem while Calculating Newey-West HAC

Displaying 20 results from an estimated 500 matches similar to: "A Problem while Calculating Newey-West HAC"

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
2013 Mar 26
1
Newey West HAC for pooled cross-section data
Hello: My dataset set contains several thousand rows of data, with each row containing information for a house. The variables include the sale price of the house, the quarter and year of sale, the attributes of the house, and the attributes of the neighborhood and the city in which the house is located. The data is for a 10-year period. No house is repeated in the dataset. In summary, the dataset
2011 Jan 22
1
Newey West HAC-errors for panels
Dear all, I am looking for an equivalent to the "newey2"-extension in Stata, in order to compute Newey-West HAC standard errors in a regression using panel data. I would be very grateful for advice which R-package could do this. I thank you very much in advance. Dirius
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
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
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 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]]
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:
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
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
2002 Oct 15
2
glm and Newey-West estimator
Dear R-users, has anybody combined the glm function with the Newey-West estimator of variance, similar as in Stata 7.0? I'd like to estimate corrected standard errors within a logistic regression model, taking into account the auto-correlated binary observations within individuals. I use R1.5.1 on Mac OS X (10.2). Thanks, Christof
2007 Oct 26
1
Newey-West and SUR regression models
Is anyone aware of a procedure to apply Newey-West corrections for autocorrelation to a SUR regression model? The SANDWICH package seems to be applicable only to LM or GLM models. Thanks, Richard Saba Department of Economics Auburn University Email: sabaric at auburn.edu
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
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.
2010 Apr 23
0
HAC and Kmean
Hi there, is it possible in r to use the Initial partition established by using the HAC partition with the kmean clustering? E.g. perform the HCA, write the cluster affiliation in a seperate column > DF$hclus.label <- assignCluster(model.matrix(~-1 + A15 + B12 + C70 + E14 + + H61 + N56 + P48 + T69 + W32 + Y43, DF), DF, cutree(HClust.1, k = 3) -> use this as initial partition in 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
2011 Jan 09
0
Bartlett HAC covariance matrix estimator
Dear everyone: I am doing a research on several stock markets. And I need to construct an Bartlett HAC covariance matrix estimator for Sigma(Cov(Y0,Yj)), j is from 0 to T. Can you tell me how to do it. Your Sincerely! Nigel Gregory 01/09/11 [[alternative HTML version deleted]]
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
2008 Oct 07
2
Statistically significant in linear and non-linear model
Hi, I have a question to ask. if in a linear regression model, the independent variables are not statistically significant, is it necessary to test these variables in a non-linear model? Since most of non-linear form of a variable can be represented to a linear combination using Taylor's theorem, so I wonder whether the non-linear form is also not statistically significant in such a