1. Trang chủ
  2. » Tài Chính - Ngân Hàng

SAS/ETS 9.22 User''''s Guide 190 ppt

10 199 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 283,74 KB

Nội dung

1882 ✦ Chapter 29: The TIMESERIES Procedure Table 29.3 Seasonal Adjustment Formulas Component Keyword MODE= Option Formula original series ORIGINAL MULT O t D T C t S t I t ADD O t D T C t C S t C I t LOGADD log.O t / D T C t C S t C I t PSEUDOADD O t D T C t .S t C I t  1/ trend-cycle component TCC MULT centered moving average of O t ADD centered moving average of O t LOGADD centered moving average of log.O t / PSEUDOADD centered moving average of O t seasonal-irregular component SIC MULT SI t D S t I t D O t =T C t ADD SI t D S t C I t D O t  T C t LOGADD SI t D S t C I t D log.O t /  T C t PSEUDOADD SI t D S t C I t  1 D O t =T C t seasonal component SC MULT seasonal Averages of SI t ADD seasonal Averages of SI t LOGADD seasonal Averages of SI t PSEUDOADD seasonal Averages of SI t irregular component IC MULT I t D SI t =S t ADD I t D SI t  S t LOGADD I t D SI t  S t PSEUDOADD I t D SI t  S t C 1 trend-cycle-seasonal component TCS MULT T CS t D T C t S t D O t =I t ADD T CS t D T C t C S t D O t  I t LOGADD T CS t D T C t C S t D O t  I t PSEUDOADD T CS t D T C t S t trend component TC MULT T t D T C t  C t ADD T t D T C t  C t LOGADD T t D T C t  C t PSEUDOADD T t D T C t  C t cycle component CC MULT C t D T C t  T t ADD C t D T C t  T t LOGADD C t D T C t  T t PSEUDOADD C t D T C t  T t seasonally adjusted series SA MULT SA t D O t =S t D T C t I t ADD SA t D O t  S t D T C t C I t LOGADD SA t D O t =exp.S t / D exp.T C t C I t / PSEUDOADD SA t D T C t I t The trend-cycle component is computed from the s-period centered moving average as follows: T C t D bs=2c X kDbs=2c y tCk =s Correlation Analysis ✦ 1883 The seasonal component is obtained by averaging the seasonal-irregular component for each season. S kCjs D X tDk mod s SI t T =s where 0Äj ÄT=s and 1ÄkÄs . The seasonal components are normalized to sum to one (multiplica- tive) or zero (additive). Correlation Analysis Correlation analysis can be performed on the working series by specifying the OUTCORR= option or one of the PLOTS= options that are associated with correlation. The CORR statement enables you to specify options that are related to correlation analysis. Autocovariance Statistics LAGS h 2 f0; : : : ; H g N N h is the number of observed products at lag h, ignoring missing values ACOV O.h/ D 1 T P T tDhC1 .y t  y/.y th  y/ ACOV O.h/ D 1 N h P T tDhC1 .y t  y/.y th  y/ when embedded missing values are present Autocorrelation Statistics ACF O.h/ D O.h/= O.0/ ACFSTD Std. O.h// D r 1 T  1 C 2 P h1 j D1 O.j / 2 Á ACFNORM Norm. O.h// D O.h/=St d. O.h// ACFPROB P rob. O.h// D 2 . 1  ˆ . jNorm. O.h//j // ACFLPROB LogP rob. O.h// D log 10 .P rob. O.h// ACF2STD F lag. O.h// D 8 < : 1 O.h/ > 2St d. O.h// 0 2Std. O.h// < O.h/ < 2Std. O.h// 1 O.h/ < 2St d. O.h// Partial Autocorrelation Statistics PACF O'.h/ D  .0;h1/ f j g h j D1 PACFSTD Std. O'.h// D 1= p N 0 PCFNORM Norm. O'.h// D O'.h/=S td. O'.h// PACFPROB P rob. O'.h// D 2 . 1  ˆ . jNorm. O'.h//j // 1884 ✦ Chapter 29: The TIMESERIES Procedure PACFLPROB LogP rob. O'.h// D log 10 .P rob. O'.h// PACF2STD F lag. O'.h// D 8 < : 1 O'.h/ > 2S td. O'.h// 0 2Std. O'.h// < O'.h/ < 2S td. O'.h// 1 O'.h/ < 2S td. O'.h// Inverse Autocorrelation Statistics IACF O Â.h/ IACFSTD Std. O Â.h// D 1= p N 0 IACFNORM Norm. O Â.h// D O Â.h/=St d. O Â.h// IACFPROB P rob. O Â.h// D 2  1  ˆ  jNorm. O Â.h//j ÁÁ IACFLPROB LogP rob. O Â.h// D log 10 .P rob. O Â.h// IACF2STD F lag. O Â.h// D 8 ˆ < ˆ : 1 O Â.h/ > 2St d. O Â.h// 0 2Std. O Â.h// < O Â.h/ < 2St d. O Â.h// 1 O Â.h/ < 2St d. O Â.h// White Noise Statistics WN Q.h/ D T .T C2/ P h j D1 .j / 2 =.T j / WN Q.h/ D P h j D1 N j .j / 2 when embedded missing values are present WNPROB P rob.Q.h// D  max.1;hp/ .Q.h// WNLPROB LogP rob.Q.h// D log 10 .P rob.Q.h// Cross-Correlation Analysis Cross-correlation analysis can be performed on the working series by specifying the OUTCROSS- CORR= option or one of the CROSSPLOTS= options that are associated with cross-correlation. The CROSSCORR statement enables you to specify options that are related to cross-correlation analysis. Cross-Correlation Statistics The cross-correlation statistics for the variable x supplied in a VAR statement and variable y supplied in a CROSSVAR statement are: LAGS h 2 f0; : : : ; H g N N h is the number of observed products at lag h, ignoring missing values CCOV O x;y .h/ D 1 T P T tDhC1 .x t  x/.y th  y/ Spectral Density Analysis ✦ 1885 CCOV O x;y .h/ D 1 N h P T tDhC1 .x t  x/.y th  y/ when embedded missing values are present CCF O x;y .h/ D O x;y .h/= p O x .0/ O y .0/ CCFSTD Std. O x;y .h// D 1= p N 0 CCFNORM Norm. O x;y .h// D O x;y .h/=Std. O x;y .h// CCFPROB P rob. O x;y .h// D 2  1  ˆ  jNorm. O x;y .h//j  CCFLPROB LogP rob. O x;y .h// D log 10 .P rob. O x;y .h// CCF2STD F lag. O x;y .h// D 8 < : 1 O x;y .h/ > 2Std. O x;y .h// 0 2Std. O x;y .h// < O x;y .h/ < 2Std. O x;y .h// 1 O x;y .h/ < 2Std. O x;y .h// Spectral Density Analysis Spectral analysis can be performed on the working series by specifying the OUTSPECTRA= option or by specifying the PLOTS=PERIODOGRAM or PLOTS=SPECTRUM option in the PROC TIMESERIES statement. PROC TIMESERIES uses the finite Fourier transform to decompose data series into a sum of sine and cosine terms of different amplitudes and wavelengths. The Fourier transform decomposition of the series x t is x t D a 0 2 C m X kD1 Œa k cos.! k t/ C b k sin.! k t/ where t is the time subscript, t D 1; 2; : : : ; n x t are the equally spaced time series data n is the number of observations in the time series m is the number of frequencies in the Fourier decomposition: m D n 2 if n is even, m D n1 2 if n is odd a 0 is the mean term: a 0 D 2x a k are the cosine coefficients b k are the sine coefficients ! k are the Fourier frequencies: ! k D 2k n Functions of the Fourier coefficients a k and b k can be plotted against frequency or against wave length to form periodograms. The amplitude periodogram J k is defined as follows: J k D n 2 .a 2 k C b 2 k / The Fourier decomposition is performed after the ACCUMULATE=, DIF=, SDIF= and TRANS- FORM= options in the ID and VAR statements have been applied. 1886 ✦ Chapter 29: The TIMESERIES Procedure Computational Method If the number of observations, n , factors into prime integers that are less than or equal to 23, and the product of the square-free factors of n is less than 210, then the procedure uses the fast Fourier transform developed by Cooley and Tukey (1965) and implemented by Singleton (1969). If n cannot be factored in this way, then the procedure uses a Chirp-Z algorithm similar to that proposed by Monro and Branch (1976). Missing Values Missing values are replaced with an estimate of the mean to perform spectral analyses. This treatment of a series with missing values is consistent with the approach used by Priestley (1981). Using Specification of Weight Constants Any number of weighting constants can be specified. The constants are interpreted symmetrically about the middle weight. The middle constant (or the constant to the right of the middle if an even number of weight constants is specified) is the relative weight of the current periodogram ordinate. The constant immediately following the middle one is the relative weight of the next periodogram ordinate, and so on. The actual weights used in the smoothing process are the weights specified in the WEIGHTS option, scaled so that they sum to 1. The moving average calculation reflects at each end of the periodogram to accommodate the period- icity of the periodogram function. For example, a simple triangular weighting can be specified using the following WEIGHTS option: spectra / weights 1 2 3 2 1; Using Kernel Specifications You can specify one of ten different kernels in the SPECTRA statement. The two parameters c  0 and e  0 are used to compute the bandwidth parameter M D cq e where q is the number of periodogram ordinates + 1, q D floor.n=2/ C 1 To specify the bandwidth explicitly, set c D to the desired bandwidth and e D 0. For example, a Parzen kernel with a support of 11 periodogram ordinates can be specified using the following kernel option: spectra / parzen c=5 expon=0; Spectral Density Analysis ✦ 1887 Kernels are used to smooth the periodogram by using a weighted moving average of nearby points. A smoothed periodogram is defined by the equation O J i .M / D q X Dq w   M Á Q J iC where w.x/ is the kernel or weight function. At the endpoints, the moving average is computed cyclically; that is, Q J iC D 8 ˆ < ˆ : J iC 0 Ä i C  Ä q J .iC/ i C  < 0 J 2q.i C/ i C  > q where J i is the ith periodogram ordinate. The TIMESERIES procedure supports the following kernels: BART: Bartlett kernel w.x/ D ( 1  jxj jxjÄ1 0 otherwise PARZEN: Parzen kernel w.x/ D 8 ˆ < ˆ : 1  6jxj 2 C 6jxj 3 0ÄjxjÄ 1 2 2.1  jxj/ 3 1 2 ÄjxjÄ1 0 otherwise QS: quadratic spectral kernel w.x/ D 3M 2 .x/ 2  sin.x=M / x=M  cos.x=M / à TUKEY: Tukey-Hanning kernel w.x/ D ( .1 C cos.x//=2 jxjÄ1 0 otherwise TRUNCAT: truncated kernel w.x/ D ( 1 jxjÄ1 0 otherwise 1888 ✦ Chapter 29: The TIMESERIES Procedure Alternatively, kernel functions can be applied as filters that estimate the autocovariance function in the time domain prior to computing the periodogram by using the DOMAIN=TIME option as Q.h/ D .h/ O .h/ where .h/ D w.h/ . To approximate this operation, complementary kernel weighting functions, w .Â/ , can be used to smooth the periodogram by using the same cyclical moving average computation described previously. The frequencies used to weight periodogram ordinates are  D =q . The five complementary weighting functions available to smooth the periodogram in this manner are: BART: Bartlett equivalent lag window filter w.Â/ D 1 2M  sin.M Â=2/ sin.Â=2/ à 2 PARZEN: Parzen equivalent lag window filter w.Â/ D 6 M 3  sin.M Â=4/ sin.Â=2/ à 4  1  2 3 sin 2 .Â=2/ à QS: quadratic spectral equivalent lag window filter w.Â/ D ( 3M 4 .1  .M Â=/ 2 / jÂj Ä =M 0 jÂj > =M TUKEY: Tukey-Hanning equivalent lag window filter w.Â/ D 1 4 D M .  =M/ C 1 2 D M .Â/ C 1 4 D M . C =M/ D M .Â/ D 1 2 sinŒ.M C 1=2/  sin.Â=2/ TRUNC: truncated equivalent lag window filter w.Â/ D D M .Â/ Singular Spectrum Analysis Given a time series, y t , for t D 1; : : : ; T , and a window length, 2 Ä L < T =2 , singular spectrum analysis Golyandina, Nekrutkin, and Zhigljavsky (2001) decompose the time series into spectral groupings using the following steps: Singular Spectrum Analysis ✦ 1889 Embedding Step Using the time series, form a K  L trajectory matrix, X, with elements X D fx k;l g K;L kD1;lD1 such that x k;l D y klC1 for k D 1; : : : ; K and l D 1; : : : ; L and where K D T  L C 1 . By definition L Ä K < T , because 2 Ä L < T =2. Decomposition Step Using the trajectory matrix, X, apply singular value decomposition to the trajectory matrix X D UQV where U represents the K  L matrix that contains the left-hand-side (LHS) eigenvectors, where Q represents the diagonal L  L matrix that contains the singular values, and where V represents the L  L matrix that conatins the right-hand-side (RHS) eigenvectors. Therefore, X D L X lD1 X .l/ D L X lD1 u l q l v T l where X .l/ represents the K L principal component matrix, u l represents the K 1 left-hand-side (LHS) eigenvector, q l represents the singular value, and v l represents the L  1 right-hand-side (RHS) eigenvector associated with the lth window index. Grouping Step For each group index, m D 1; : : : ; M , define a group of window indices I m  f1; : : : ; Lg. Let X I m D X l2I m X .l/ D X l2I m u l q l v T l represent the grouped trajectory matrix for group I m . If groupings represent a spectral partition, M [ mD1 I m D f1; : : : ; Lg and I m \ I n D ; for m ¤ n then according to the singular value decomposition theory, X D M X mD1 X I m Averaging Step For each group index, m D 1; : : : ; M , compute the diagonal average of X I m , Qx .m/ t D 1 n t e t X lDs t x .m/ tlC1;l 1890 ✦ Chapter 29: The TIMESERIES Procedure where s t D 1; e t D t; n t D t for 1 Ä t < L s t D 1; e t D L; n t D L for L Ä t Ä T  L C 1 s t D T t  1; e t D L; n t D T t C 1 for T L C1 < t Ä T If the groupings represent a spectral partition, then by definition y t D M X mD1 Qx .m/ t Hence, singular spectrum analysis additively decomposes the original time series, y t , into m compo- nent series Qx .m/ t for m D 1; : : : ; M . Specifying the Window Length You can explicitly specify the maximum window length, 2 Ä L Ä 1000 , using the LENGTH= option or implicitly specify the window length using the INTERVAL= option in the ID statement or the SEASONALITY= option in the PROC TIMESERIES statement. Either way the window length is reduced based on the accumulated time series length, T , to enforce the requirement that 2 Ä L Ä T =2. Specifying the Groups You can use the GROUPS= option to explicitly specify the composition and number of groups, I m  f1; : : : ; Lg or use the THRESHOLDPCT= option in the SSA statement to implicitly specify the grouping. The THRESHOLDPCT= option is useful for removing noise or less dominant patterns from the accumulated time series. Let 0 < ˛ < 1 be the cumulative percent singular value THRESHOLDPCT=. Then the last group, I M D fl ˛ ; : : : ; Lg, is determined by the smallest value such that 0 @ l ˛ 1 X lD1 q l  L X lD1 q l 1 A  ˛ where 1 < l ˛ Ä L Using this rule, the last group, I M , describes the least dominant patterns in the time series and the size of the last group is at least one and is less than the window length, L  2. Data Set Output The TIMESERIES procedure can create the OUT=, OUTCORR=, OUTCROSSCORR=, OUTDE- COMP=, OUTSEASON=, OUTSPECTRA=, OUTSSA=, OUTSUM=, and OUTTREND= data sets. In general, these data sets contain the variables listed in the BY statement. If an analysis step that is related to an output data step fails, the values of this step are not recorded or are set to missing in the related output data set and appropriate error and/or warning messages are recorded in the log. OUT= Data Set ✦ 1891 OUT= Data Set The OUT= data set contains the variables specified in the BY, ID, VAR, and CROSSVAR statements. If the ID statement is specified, the ID variable values are aligned and extended based on the ALIGN= and INTERVAL= options. The values of the variables specified in the VAR and CROSSVAR statements are accumulated based on the ACCUMULATE= option, and missing values are interpreted based on the SETMISSING= option. OUTCORR= Data Set The OUTCORR= data set contains the variables specified in the BY statement as well as the variables listed below. The OUTCORR= data set records the correlations for each variable specified in a VAR statement (not the CROSSVAR statement). When the CORR statement TRANSPOSE=NO option is omitted or specified explicitly, the variable names are related to correlation statistics specified in the CORR statement options and the variable values are related to the NLAG= or LAGS= option. _NAME_ variable name LAG time lag N number of variance products ACOV autocovariances ACF autocorrelations ACFSTD autocorrelation standard errors ACF2STD an indicator of whether autocorrelations are less than (–1), greater than (1), or within (0) two standard errors of zero ACFNORM normalized autocorrelations ACFPROB autocorrelation probabilities ACFLPROB autocorrelation log probabilities PACF partial autocorrelations PACFSTD partial autocorrelation standard errors PACF2STD an indicator of whether partial autocorrelations are less than (–1), greater than (1), or within (0) two standard errors of zero PACFNORM partial normalized autocorrelations PACFPROB partial autocorrelation probabilities PACFLPROB partial autocorrelation log probabilities IACF inverse autocorrelations IACFSTD an indicator of whether inverse autocorrelations are less than (–1), greater than (1), or within (0) two standard errors of zero . and Tukey ( 196 5) and implemented by Singleton ( 196 9). If n cannot be factored in this way, then the procedure uses a Chirp-Z algorithm similar to that proposed by Monro and Branch ( 197 6). Missing. 1882 ✦ Chapter 29: The TIMESERIES Procedure Table 29. 3 Seasonal Adjustment Formulas Component Keyword MODE= Option Formula original. M , compute the diagonal average of X I m , Qx .m/ t D 1 n t e t X lDs t x .m/ tlC1;l 1 890 ✦ Chapter 29: The TIMESERIES Procedure where s t D 1; e t D t; n t D t for 1 Ä t < L s t D 1; e t D

Ngày đăng: 02/07/2014, 15:20

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN