[R] garch function in R

Gavin Simpson gavin.simpson at ucl.ac.uk
Mon Nov 21 17:11:27 CET 2005


On Mon, 2005-11-21 at 07:44 -0800, Xiaodong Jin wrote:
> I'm using R 2.1.1 and just successfully installed packages tseries, fseries.
>    
>   I try to run example
>   http://www.maths.lth.se/help/R/.R/library/tseries/html/garch.html
>   But it shows
>   > x.arch <- garch(x, order = c(0,2))  # Fit ARCH(2) 
> Error: couldn't find function "garch"
>    
>   Then I run command
>   > help.search("garch")
>   it shows the R information.

Did you load the package before trying to use it? E.g.:

library(tseries)

>From a fresh R session this is what I get:

> ?garch #error as I haven't loaded the package
No documentation for 'garch' in specified packages and libraries:
you could try 'help.search("garch")'
> library(tseries)
Loading required package: quadprog
Loading required package: zoo
> ?garch #displays help file as expected

>    
>   Which package(s) do I really need to run garch models?

Looks like you need quadprog and zoo to be installed and available as
well.

>   Thanks,
>   Shelton

HTH,

Gav

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson                     [T] +44 (0)20 7679 5522
ENSIS Research Fellow             [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC                 [E] gavin.simpsonATNOSPAMucl.ac.uk
UCL Department of Geography       [W] http://www.ucl.ac.uk/~ucfagls/cv/
26 Bedford Way                    [W] http://www.ucl.ac.uk/~ucfagls/
London.  WC1H 0AP.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%




More information about the R-help mailing list