12.07.2015 Views

GNU Octave - Local Sector 7 web page

GNU Octave - Local Sector 7 web page

GNU Octave - Local Sector 7 web page

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

286 <strong>GNU</strong> <strong>Octave</strong>sinc (x)Return sin(πx)/(πx).Function Fileb = unwrap (a, tol, dim)Function FileUnwrap radian phases by adding multiples of 2*pi as appropriate to remove jumpsgreater than tol. tol defaults to pi.Unwrap will unwrap along the first non-singleton dimension of a, unless the optionalargument dim is given, in which case the data will be unwrapped along this dimension[a, b] = arch fit (y, x, p, iter, gamma, a0, b0)Function FileFit an ARCH regression model to the time series y using the scoring algorithm inEngle’s original ARCH paper. The model isy(t) = b(1) * x(t,1) + ... + b(k) * x(t,k) + e(t),h(t) = a(1) + a(2) * e(t-1)^2 + ... + a(p+1) * e(t-p)^2in which e(t) is N(0, h(t)), given a time-series vector y up to time t − 1 and a matrixof (ordinary) regressors x up to t. The order of the regression of the residual varianceis specified by p.If invoked as arch_fit (y, k, p) with a positive integer k, fit an ARCH(k, p) process,i.e., do the above with the t-th row of x given by[1, y(t-1), ..., y(t-k)]Optionally, one can specify the number of iterations iter, the updating factor gamma,and initial values a0 and b0 for the scoring algorithm.arch rnd (a, b, t)Function FileSimulate an ARCH sequence of length t with AR coefficients b and CH coefficientsa. I.e., the result y(t) follows the modely(t) = b(1) + b(2) * y(t-1) + ... + b(lb) * y(t-lb+1) + e(t),where e(t), given y up to time t − 1, is N(0, h(t)), withh(t) = a(1) + a(2) * e(t-1)^2 + ... + a(la) * e(t-la+1)^2[pval, lm] = arch test (y, x, p)For a linear regression modely = x * b + eFunction Fileperform a Lagrange Multiplier (LM) test of the null hypothesis of no conditionalheteroscedascity against the alternative of CH(p).I.e., the model isy(t) = b(1) * x(t,1) + ... + b(k) * x(t,k) + e(t),given y up to t − 1 and x up to t, e(t) is N(0, h(t)) withh(t) = v + a(1) * e(t-1)^2 + ... + a(p) * e(t-p)^2,and the null is a(1) == . . . == a(p) == 0.If the second argument is a scalar integer, k, perform the same test in a linear autoregressionmodel of order k, i.e., with

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!