search for: prewhit

Displaying 11 results from an estimated 11 matches for "prewhit".

Did you mean: prewhite
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]]
2024 Feb 23
2
help - Package: stats - function ar.ols
...t; > 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, which I do not know > > what it means, if someone could clarify it, I would really appreciate > > it. > > > > Attached to t...
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, which I do not know what it means, if someone could clarify it, I would really appreciate it. Attached to this email you will find my code and data I used to run this...
2008 Nov 20
0
A Problem while Calculating Newey-West HAC
...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 May 18
1
strucchange package Linux help
...require(strucchange) data("RealInt") bp.ri <- breakpoints(RealInt~1, h=15) summary(bp.ri) fac.ri <- breakfactor(bp.ri, breaks = 3, label='seg') fm.ri <- lm(RealInt~0 + fac.ri) summary(fm.ri) vcov.ri <- function(x,...) kernHAC (x, kernel = 'Quadratic Spectral', prewhite = 1, approx = 'AR(1)', ...) coef(bp.ri, breaks <- 3) sapply(vcov(bp.ri, breaks = 3, vcov=vcov.ri), sqrt) confint(bp.ri, breaks = 3, vcov=vcov.ri) png('SCC2.png') plot(RealInt) lines(as.vector(time(RealInt)), fitted(fm.ri), col=4) lines(confint(bp.ri, breaks = 3, vcov=vcov.ri))...
2024 Feb 23
1
help - Package: stats - function ar.ols
...veu: > 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, which I do not know > what it means, if someone could clarify it, I would really appreciate > it. > > Attached to this email you will find my co...
2024 Feb 23
1
help - Package: stats - function ar.ols
...t; > 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, which > > I do not know what it means, if someone could clarify it, I would > > really appreciate it. > > > > Attached to t...
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 idea of specifying my choice of overlapping periods. for me, the need often...
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
2012 Mar 25
2
avoiding for loops
I have data that looks like this: > df1 group id 1 red A 2 red B 3 red C 4 blue D 5 blue E 6 blue F I want a list of the groups containing vectors with the ids. I am avoiding subset(), as it is only recommended for interactive use. Here's what I have so far: df1 <- data.frame(group=c("red", "red", "red", "blue",