garch estimation
[rgarch]=garch(namey,arg1,...,argn)
* namey = a time series, a real (nx1) vector or a string equal to the name of a time series or a (nx1) real vector between quotes
* argi = an argument which can be:
- a time series
- a real (nxp) vector
- a string equal to the name of a time series or a (nxp) real vector between quotes
- the string 'noprint' if the user doesn't want to print the results of the regression
- 'b = xx' where xx is a (k x 1) vector of B starting values
- 'b = xx' where xx is a (k x 1) vector of B starting values
- 'a0 = xx' where xx is a0 starting values to feed the maximisation programm
- 'ar = xx' where xx is (p x 1) vector of ar starting values to feed the maximisation programm
- 'ma = xx' where xx is (q x 1) vector of ma starting values to feed the maximisation programm
- 'meth=maxlik' or 'meth=optim' (default)
- any option to maxlik (see maxlik for a list)
- the string 'dropna' if the user wants to remove the NA values from the data
- 'optfunc=optim' if the user wants to use the optim optimisation function (default: optimg)
- 'opt_nelmead=crit,nitermax' with crit the value of the convergence criterion in the Nelder-Meade optimisation function and nitermax the maximum number of iterations (default = 'opt_nelmead=2*%eps,1000')
- 'opt_optim=opts' where opts are options for optim that can be entered after the starting value of the parameters (default = 'opt_optim=,''ar'',1e6,1e6'')
- 'opt_convg=val' where val is the threshold on gradient norm (default = 'opt_convg=1e-5')
* rgarcha result tlist with:
- rgarch('meth') = 'garch'
- rgarch('optmeth') = 'optim' or 'maxlik' (method used (the optimisation)
- rgarch('y') = y data vector
- rgarch('x') = x data matrix
- rgarch('nobs') = # observations
- rgarch('nvar') = # variables
- rgarch('beta') = bhat
- rgarch('yhat') = yhat
- rgarch('resid') = residuals
- rgarch('vcovar') = estimated variance-covariance matrix of beta
- rgarch('sige') = estimated variance of the residuals
- rgarch('sigu') = sum of squared residuals
- rgarch('ser') = standard error of the regression
- rgarch('tstat') = t-stats
- rgarch('pvalue') = pvalue of the betas
- rgarch('dw') = Durbin-Watson Statistic
- rgarch('condindex') = multicolinearity cond index
- rgarch('prescte') = boolean indicating the presence or absence of a constant in the regression
- rgarch('b') = estimated b
- rgarch('a0') = estimated a0
- rgarch('ar') = estimated ar
- rgarch('ma') = estimated ma
- rgarch('sigt') = estimated h(t)
- rgarch('like') = log-likelihood
- rgarch('parm1') = vector of stacked parameters
- rgarch('aic') = Akaïke information criterion
- rgarch('bic') = Schwarz information criterion
- rgarch('hq') = Hannan-Quinn information criterion
- rgarch('rbar') = rbar-squared
- rgarch('f') = F-stat for the nullity of coefficients other than the constant
- rgarch('pvaluef') = its significance level
- rgarch('prests') = boolean indicating the presence or absence of a time series in the regression
- rgarch('namey') = name of the y variable
- rgarch('namex') = name of the x variables
- rgarch('dropna') = boolean indicating if NAs have been dropped
- rgarch('bounds') = if there is a timeseries in the forecast, the bounds of the regression
- rgarch('nonna') = vector indicating position of non-NAs
y(t) = X(t)*b + e(t), e(t) = N(0,h(t))
h(t) = a0 +
ar(1)*h(t-1) + ... + ar(p)*h(t-p) + ma(1)*e(t-1)^2 + ... + ma(q)*e(t-q)^2load(GROCERDIR+'/data/garchd.dat') bounds('1949q1','1983q4') r1 = ols('gnpdef','cte','lagts(gnpdef)','lagts(2,gnpdef)','lagts(3,gnpdef)','lagts(4,gnpdef)'); bet = r1('beta'); s = r1('ser'); r2 = garch('gnpdef','cte','lagts(gnpdef)','lagts(2,gnpdef)','lagts(3,gnpdef)','lagts(4,gnpdef)','a0=s','ar=0','ma=0','b=bet'); // Example taken from function garch_d(). Estimates a garch(1,1) model, taken from Greene's book. Starting values for a0, ar and ma are // s (in garch_d, s is the estimated variance of the corresponding ols model), 0 and 0. Starting value for b is also taken from // ols estimation. Optimisation method is maxlik. | ![]() | ![]() |