cusum.m

来自「动态时间序列分析工具包.包括有ARMA,harmonic model,kalma」· M 代码 · 共 30 行

M
30
字号
function [CUSUM, CUSUMSQ]= cusum(y)
% CUSUM  CUSUM and CUSUMSQ tests
%
% [CUSUM, CUSUMSQ] = cusum(y)
%
% y: Time series (*)
%
% CUSUM: Cusum recursive test for time varying mean
% CUSUMSQ: Cusumsq recursive test for time varying variance
%
% See also HISTON, BOXCOX

% Copyright (c) 2006 by CRES, Lancaster University, United Kingdom
% Authors : Peter Young, Wlodek Tych, Diego Pedregal, James Taylor

% This function provides the usual CUSUM (cumulative sum) and 
% CUSUM of squares of a given time series. The CUSUM is 
% computed as the cumulative sum of the standardised series. If 
% the mean changes along the series there will be runs of positive 
% or negative observations; here, the cumulative sum will drift up 
% or down the zero line. The formal assessment is completed on 
% the basis of the 5% confidence bands that are also plotted in the 
% graphical output. Crossing any of the boundaries is an indication 
% of lack of constancy in the mean.
% 
% The CUSUM of squares is similar to the previous description, 
% except that the cumulative sum is performed on the cumulative 
% sum of squares. Therefore, it always increases as time increases, 
% but if the time series is homoskedastic, this increment should be 
% linear, i.e. it should not depart from the 45

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?