The function rcorr.test computes the test statistics for examining the null hypothesis of zero Pearson correlation for multivariate series in Dalla, Giraitis and Phillips (2022).
rcorr.test(x, plot = TRUE, var.names = NULL, scale.font = 1)An object of class "rcorr.test", which is a list with the following components:
The sample Pearson correlations.
The p-values for the \(\widetilde{t}\) test statistics.
The variable names used in the plot/table.
A numeric matrix or a multivariate numeric time series object (ts, xts, zoo) or a data frame.
Logical. If TRUE the sample Pearson correlations and the p-values for significance are plotted. Default is TRUE.
NULL or a character string specifying the variable names. If NULL and x has names, the names of x are used. If NULL and x has no names, the string c("x[1]","x[2]",...) is used. Default is NULL.
A positive number indicating the scaling of the font size in the plots. Default is 1.
Violetta Dalla, Liudas Giraitis and Peter C. B. Phillips
The p-value of the robust \(\widetilde{t}\) statistic is for testing the null hypothesis \(H_0:\rho_{i,j}=0\), where \(\rho_{i,j}\) denotes the correlation of \(x_{i}\) and \(x_{j}\).
Dalla, V., Giraitis, L. and Phillips, P. C. B. (2022). "Robust Tests for White Noise and Cross-Correlation". Econometric Theory, 38(5), 913-941, tools:::Rd_expr_doi("doi:10.1017/S0266466620000341"). Cowles Foundation, Discussion Paper No. 2194RS, https://elischolar.library.yale.edu/cowles-discussion-paper-series/57/.
Giraitis, L., Li, Y. and Phillips, P. C. B. (2024). "Robust Inference on Correlation under General Heterogeneity". Journal of Econometrics, 244(1), 105691, tools:::Rd_expr_doi("doi:10.1016/j.jeconom.2024.105691").
x <- matrix(rnorm(400), 100)
rcorr.test(x)
Run the code above in your browser using DataLab