Good day Erin,
 
Your advice worked well. I used str(fit), which produces a list of tags or functions that correspond to each of the figures in the output. From that I used fit@fit$llh and I was able to extract the log-likelihood.
 
Thank you for your help.
 
Regards,
 
Mohammad

--- On Tue, 4/7/09, Hodgess, Erin <HodgessE@uhd.edu> wrote:


From: Hodgess, Erin <HodgessE@uhd.edu>
Subject: RE: [R-SIG-Finance] Extracting AIC or Log-Likelihood from a fitted GARCH
To: "Mohammad Sabr" <mohammad_sabr@yahoo.com>
Cc: r-sig-finance@stat.math.ethz.ch
Date: Tuesday, April 7, 2009, 6:48 PM



How about str(fit)?



Erin M. Hodgess, PhD
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: hodgesse@uhd.edu



-----Original Message-----
From: Mohammad Sabr [mailto:mohammad_sabr@yahoo.com]
Sent: Tue 4/7/2009 2:10 PM
To: Hodgess, Erin
Cc: r-sig-finance@stat.math.ethz.ch
Subject: RE: [R-SIG-Finance] Extracting AIC or Log-Likelihood from a fitted GARCH

I tried names(fit) and It gave me NULL result
 


--- On Tue, 4/7/09, Hodgess, Erin <HodgessE@uhd.edu> wrote:


From: Hodgess, Erin <HodgessE@uhd.edu>
Subject: RE: [R-SIG-Finance] Extracting AIC or Log-Likelihood from a fitted GARCH
To: "Mohammad Sabr" <mohammad_sabr@yahoo.com>
Date: Tuesday, April 7, 2009, 2:37 PM



Did you check names(fit)?



Erin M. Hodgess, PhD
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: hodgesse@uhd.edu



-----Original Message-----
From: r-sig-finance-bounces@stat.math.ethz.ch on behalf of Mohammad Sabr
Sent: Tue 4/7/2009 12:30 PM
To: r-sig-finance@stat.math.ethz.ch
Subject: [R-SIG-Finance] Extracting AIC or Log-Likelihood from a fitted GARCH

Good day everyone,
 
I fitted a garch model using garchFit from the fGarch package, and I would like to extract the log-likelihood of the fitted model or its corresponding AIC and BIC values.
 
When I use the summary function, I see that it provides me with the values mentioned above. However, I want to extract them into a matrix of a data.frame. I used the logLik function I receive the following error:
 
Error in UseMethod("logLik") : no applicable method for "logLik"
 
The steps that I followed are as follows:
 
fit = garchFit(~arma(3,3)+garch(1,1), data)
S = summary(fit)
logLik(S)   -   or logLike(summary(fit))
 
Do any one know how to extract these values from a summary function or the garchFit function.
 
Any help will be appreciated,
 
Mohammad
        [[alternative HTML version deleted]]




	[[alternative HTML version deleted]]

