[R] fGarch: garchFit and include.shape/shape parameters
benkjellson at gmail.com
Sun Nov 6 12:08:03 CET 2011
The function garchFit in the package fGarch allows for choosing a
conditional distribution, one of which is the t-distribution. The function
allows specification of the shape parameter of the distribution (equal to
the degrees of freedom for the t-distribution), for which the default is set
to 4. The function also includes an option "include.shape", which is "a
logical flag which determines if the parameter for the shape of the
conditional distribution will be estimated or not." Further, it says that
"if include.shape=FALSE then the shape parameter will be kept fixed during
the process of parameter optimization."
If I have understood things correctly, I should then set include.shape =
TRUE if I want the degrees of freedom (shape parameter) to be estimated when
i use garchFit with conditional distribution set to "std".
*Problem:* garchFit appears to keep using the default "shape = 4" even when
include.shape is set to TRUE. I have tried this in a loop where garchFit is
used on a different data set in each iteration, and inspecting the saved
shape parameter estimates from the model (i.e. extracted by
modelname at fit$params$shape), I see that they all have the value 4. I have
also tried setting "shape = NULL" (error), and shape = FALSE does not help
since FALSE == 0.
Have I missed something here, or is this a bug of some sort?
Thanks in advance.
P.S. I noticed that there are some discrepancies between the package manual
and the package as it is run, concerning which conditional distributions are
allowed for the garchFit function, but it is perhaps a smaller matter.
View this message in context: http://r.789695.n4.nabble.com/fGarch-garchFit-and-include-shape-shape-parameters-tp3995466p3995466.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help