Graves [mailto:[EMAIL PROTECTED]
>Gesendet: Mittwoch, 6. Februar 2008 05:02
>An: Pfaff, Bernhard Dr.
>Cc: tom soyer; r-help@r-project.org
>Betreff: Re: AW: [R] ARCH LM test for univariant time series
>
>Dear Bernhard:
>
> Thanks very much. Unless you object, I shall add
Dear Bernhard:
Thanks very much. Unless you object, I shall add it to the
'FinTS' library as "ArchTest" (comparable to the S-PLUS Finmetrics
'archTest' function) -- with a worked example in '\scripts\ch03.R'.
Best Wishes,
Spencer
Pfaff, Bernhard Dr. wrote:
> Dear All,
>
>
Thanks Bernhard for the beautiful code!!
On 2/4/08, Pfaff, Bernhard Dr. <[EMAIL PROTECTED]> wrote:
>
> Dear All,
>
>
> one can visually inspect ARCH-effects by plotting acf/pacf of the
> squared residuals from an OLS-estimation. This can be as simple as a
> demeaned series. Further one can run an
Dear All,
one can visually inspect ARCH-effects by plotting acf/pacf of the
squared residuals from an OLS-estimation. This can be as simple as a
demeaned series. Further one can run an auxiliary regression by
regressing q lagged squared values and a constant on the squared series
itself. This tes
tom soyer wrote:
> Spencer,
>
> The warning message is sent from VAR, it basically lets you know that the
> data it used had no column names and it had to supply them using y1, y2, y3,
> etc. It can be suppressed by including options(warn=-1) in the function.
>
> Anyway, it seems that the p
Spencer,
The warning message is sent from VAR, it basically lets you know that the
data it used had no column names and it had to supply them using y1, y2, y3,
etc. It can be suppressed by including options(warn=-1) in the function.
Anyway, it seems that the p value from my function does not matc
Dear Tom:
Your revised function eliminates the discrepancy in the degrees of
freedom but is still very different from the numbers reports on Tsay, p.
102:
archTest(log(1+as.numeric(m.intc7303)), lag=12)
ARCH test (univariate)
data: Residual of y1 equation
Chi-squared = 13.1483,
OK, it's no good. Here is the result:
> data(m.intc7303)
> archTest(log(1+as.numeric(m.intc7303)), lags=12)
ARCH test (univariate)
data: Residual of y1 equation
Chi-squared = 13.1483, df = 12, p-value = 0.3584
On 2/2/08, tom soyer <[EMAIL PROTECTED]> wrote:
>
> Spencer,
>
> Sorry, I
Spencer,
Sorry, I forgot that the default lag in arch is 16. Here is the fix. Can you
try it again and see if it gives the correct (or at least similar compared
to a true LM test) result?
archTest=function(x, lags=12){
#x is a vector
require(vars)
s=embed(x,lags)
y=VAR(s,p=1,type="const")
re
Dear Tom, Bernhard, Ruey:
I can't get that to match Tsay's example, but I have other
questions about that.
1. I got the following using Tom's 'archTest' function (below):
> archTest(log(1+as.numeric(m.intc7303)), lags=12)
ARCH test (univariate)
data: Residual of y1 equat
Spencer, how about something like this:
archTest=function (x, lags= 16){
#x is a vector
require(vars)
s=embed(x,lags)
y=VAR(s,p=1,type="const")
result=arch(y,multi=F)$arch.uni[[1]]
return(result)
}
can you, or maybe Bernhard, check and see whether this function gives the
correct result?
th
Hi, Tom:
The 'arch' function in the 'vars' package is supposed to be able
to do that. Unfortunately, I was unable to make it work for a
univariate series. Bernhard Pfaff, the author of 'vars', said that if I
read the code for 'arch', I could easily retrieve the necessary lines
and put
Hi,
Does anyone know if R has a Lagrange multiplier (LM) test for ARCH
effects for univariant time series?
Thanks!
--
Tom
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
13 matches
Mail list logo