Calculates the test stats, p-value or critical value of the correlation test.
Syntax
XCFTest(Y, X, K, Rho, Method, Return_type, Alpha)
- Y
- is the first data series (one dimensional array of cells (e.g. rows or columns)).
- X
- is the second data series (one dimensional array of cells (e.g. rows or columns)).
- K
- is the lag order (e.g. 0=no lag, 1=1st lag, etc.) to use with second time series input (X). If missing, the default lag order of zero (i.e. no-lag) is assumed.
- Rho
- is the hypothetical (assumed) correlation factor. If missing, the default value of zero is assumed.
- Method
- is the desired correlation coefficient (1=Pearson (default), 2=Spearman, 3= Kendall). If missing, a Pearson coefficient is assumed.
Method Description 1 Pearson 2 Spearman 3 Kendall - Return_type
- is a switch to select the return output (1 = P-Value (default), 2 = Test Stats, 3 = Critical Value).
Method Description 1 P-Value 2 Test Statistics (e.g. Z-score) 3 Critical Value - Alpha
- is the statistical significance or confidence level (i.e. alpha). If missing or omitted, an alpha value of 5% is assumed.
Remarks
- The XCF test performs the following test:
- The XCF test hypothesis: $$H_{o}: \rho_{x,y}=0$$ $$H_{1}: \rho_{x,y} \neq 0$$ Where:
- $H_{o}$ is the null hypothesis ($\hat\rho$ is not different from zero)
- $H_{1}$ is the alternate hypothesis ($\hat\rho$ is statistically significant)
- $\rho_{x,y}$ is the correlation factor between population X and Y
- The time series is homogeneous or equally spaced.
- The significance level (i.e. alpha) is only needed for calculating the test critical value.
- The time series may include missing values (e.g. #N/A) at either end.
- This is a two-tails (sides) test, so the computed p-value should be compared with half of the significance level ($\alpha$).
Examples
Example 1:
|
|
Formula | Description (Result) |
---|---|
=XCFTest(\$B\$2:\$B\$20,\$C\$2:\$C\$20,1,1) | =XCFTest for P-Value (0.100) |
=XCFTest(\$B\$2:\$B\$20,\$C\$2:\$C\$20,1,2) | XCFTest for Test Statistics (1.335) |
=XCFTest(\$B\$2:\$B\$20,\$C\$2:\$C\$20,1,3) | XCFTest for Critical Value (2.120) |
Files Examples
Related Links
References
- Jarque, Carlos M.; Anil K. Bera (1980). "Efficient tests for normality, homoscedasticity and serial independence of regression residuals". Economics Letters 6 (3): 255-259.
- Ljung, G. M. and Box, G. E. P., "On a measure of lack of fit in time series models." Biometrika 65 (1978): 297-303
- Enders, W., "Applied econometric time series", John Wiley & Sons, 1995, p. 86-87
- Shapiro, S. S. and Wilk, M. B. (1965). "An analysis of variance test for normality (complete samples)", Biometrika, 52, 3 and 4, pages 591-611
Comments
Article is closed for comments.