Home > freetb4matlab > signal > arch_test.m

# arch_test

## PURPOSE

% For a linear regression model

## SYNOPSIS

function [pval, lm] = arch_test (y, X, p)

## DESCRIPTION

```% -*- texinfo -*-
% @deftypefn {Function File} {[@var{pval}, @var{lm}] =} arch_test (@var{y}, @var{x}, @var{p})
% For a linear regression model
%
% @example
% y = x * b + e
% @end example
%
% @noindent
% perform a Lagrange Multiplier (LM) test of the null hypothesis of no
% conditional heteroscedascity against the alternative of CH(@var{p}).
%
% I.e., the model is
%
% @example
% y(t) = b(1) * x(t,1) + @dots{} + b(k) * x(t,k) + e(t),
% @end example
%
% @noindent
% given @var{y} up to @math{t-1} and @var{x} up to @math{t},
% @math{e}(t) is @math{N(0, h(t))} with
%
% @example
% h(t) = v + a(1) * e(t-1)^2 + @dots{} + a(p) * e(t-p)^2,
% @end example
%
% @noindent
% and the null is @math{a(1)} == @dots{} == @math{a(p)} == 0.
%
% If the second argument is a scalar integer, @math{k}, perform the same
% test in a linear autoregression model of order @math{k}, i.e., with
%
% @example
% [1, y(t-1), @dots{}, y(t-@var{k})]
% @end example
%
% @noindent
% as the @math{t}-th row of @var{x}.
%
% Under the null, LM approximately has a chisquare distribution with
% @var{p} degrees of freedom and @var{pval} is the @math{p}-value (1
% minus the CDF of this distribution at LM) of the test.
%
% If no output argument is given, the @math{p}-value is displayed.
% @end deftypefn```

## CROSS-REFERENCE INFORMATION

This function calls:
• autoreg_matrix % Given a time series (vector) @var{y}, return a matrix with ones in the
This function is called by:

Generated on Sat 16-May-2009 00:04:49 by m2html © 2003