Re: [R] ARCH LM test for univariant time series

From: tom soyer <tom.soyer_at_gmail.com>
Date: Fri, 1 Feb 2008 23:46:04 -0600

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?

thanks,

On 2/1/08, Spencer Graves <spencer.graves_at_pdf.com> wrote:
>
> 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 them in my own function; I have not so far found the time to
> try that. If you do, or if you get a better answer than this, would you
> please let me know? I would like to have this capability for the
> 'FinTS' package, and I would happily write a help page if someone would
> contribute the function -- or use a function in another package. Tsay
> (2005) Analysis of Financial Time Series, 2nd ed. (Wiley) includes an
> example on p. 103 that could be used for a reference.
>
> Hope this helps.
> Spencer Graves

>
> tom soyer wrote:
> > 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_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 02 Feb 2008 - 05:51:53 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 02 Feb 2008 - 17:30:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive