Description Usage Arguments Details Value Note Author(s) References Examples
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 (2020).
1 2 |
x |
A numeric matrix or a multivariate numeric time series object or a data frame. |
plot |
Logical. If TRUE the sample Pearson correlations and the p-values for significance are plotted. Default is TRUE. |
table |
Logical. If TRUE the sample Pearson correlations and the p-values for significance are printed out. Default is TRUE. |
var.names |
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. |
scale.font |
A positive number indicating the scaling of the font size in the plots. Default is 1. |
The p-value of the robust t-tilde statistic is for testing the null hypothesis H[0]:ρ[i,j]=0, where ρ[i,j] denotes the correlation of x[i] and x[j].
An object of class "rcorr.test", which is a list with the following components:
pc |
The sample Pearson correlations. |
pv |
The p-values for the t-tilde test statistics. |
Missing values are not allowed.
Violetta Dalla, Liudas Giraitis and Peter C. B. Phillips
Dalla, V., Giraitis, L. and Phillips, P. C. B. (2020). "Robust Tests for White Noise and Cross-Correlation". Cowles Foundation, Discussion Paper No. 2194, https://cowles.yale.edu/sites/default/files/files/pub/d21/d2194-r.pdf.
1 2 | x <- matrix(rnorm(400),100)
rcorr.test(x)
|
Matrix of Pearson correlations
x1 x2 x3 x4
x1 1 0.014 -0.004 -0.159
x2 0.014 1 0.083 -0.038
x3 -0.004 0.083 1 -0.033
x4 -0.159 -0.038 -0.033 1
Matrix of p-values
x1 x2 x3 x4
x1 0.898 0.972 0.086
x2 0.898 0.370 0.689
x3 0.972 0.370 0.723
x4 0.086 0.689 0.723
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.