Hi Chris,

 

You may want to look for ar detailed description at:

https://svn.r-project.org/Rmetrics/trunk/fSeries/test/runit4C.R

 

Kind regards

 

Joerg


From: gretl-users-bounces@lists.wfu.edu [mailto:gretl-users-bounces@lists.wfu.edu] On Behalf Of Chris
Sent: Wednesday, 6. June 2007 3:33 PM
To: Gretl list
Subject: [Gretl-users] R question

 

Hi,

So, as per my previous question I've delved into R because it looks like I should be using a function in there called garchFit. I'm suffering some sever confusion over how to put the data into the function though. in the man page it says to use it like this: garchoutput <- garchFit(~arma(1,1)+garch(1,1), DATA).

 

I don't know how to enter the data portion. if I put in the regular ols type function y ~ x1 + x2 ....

I get the error: Error in as.data.frame.default(data) : cannot coerce class "formula" into a data.frame

 

if I put the Y variable into a dataframe with the x variables I get this error:

Error in model.frame(formula, rownames, variables, varnames, extras, extranames,  :
        invalid type (list) for variable 'x'

 

here's the command used:

archoutput <- garchFit(formula=~arma(1,1)+garch(2,24), xy.df)

 

 

Any help would be greatly appreciated

 

thanks,

 

Chris