Use "rugarch" package, here is example:
my_spec <- ugarchspec(<br />
variance.model = list(model = "fGARCH", garchOrder = c(1, 1), submodel = "GARCH", external.regressors = NULL, variance.targeting = FALSE),<br />
mean.model = list(armaOrder = c(0, 0), include.mean = TRUE, archm = FALSE,archpow = 1, arfima = FALSE, external.regressors = NULL, archex = FALSE),<br />
distribution.model = "norm")</p>
<p>my.fit <- ugarchfit(my.data, spec = my_spec)<br />
ugarchspec define the garch specification, ugarchfit do the fitting, my.fit save the result, run
<br />
my.fit<br />
plot(my.fit)<br />
to see the result.
To use IGARCH, quote from help file:
variance.model
List containing the variance model specification:
model Valid models (currently implemented) are “sGARCH”, “fGARCH”, “eGARCH”, “gjrGARCH”, “apARCH” and “iGARCH” and “csGARCH”.
garchOrder The ARCH (q) and GARCH (p) orders.
submodel If the model is “fGARCH”, valid submodels are “GARCH”, “TGARCH”, “AVGARCH”, “NGARCH”, “NAGARCH”, “APARCH”,“GJRGARCH” and “ALLGARCH”.
</p>