Last data update: 2014.03.03
R: Nonparametric tests of independence between random vectors
dependogram R Documentation
Nonparametric tests of independence between random vectors
Description
This function can be used for the following two problems:
1) testing mutual independence between many
numerical random vectors, and 2) testing for serial independence of a multivariate
stationary numerical time series. The proposed test does not assume
continuous marginals. It is valid for any probability distribution. It
is also invariant with respect to the affine general linear group of transformations on
the vectors. This test is based on a
characterization of mutual independence defined from probabilities
of half-spaces in a combinatorial formula of Mobius. As such,
it is a natural generalization of tests of independence between
univariate random variables using the empirical distribution
function. Without the assumption that each vector is
one-dimensional with a continuous cumulative distribution
function, any test of independence can not be distribution free.
The critical values of the proposed test are thus computed with
the bootstrap which was shown to be consistent in this context.
Usage
dependogram(X,vecd.ou.p,N=10,B=2000,alpha=0.05,display=TRUE,graphics=TRUE,nbclus=1)
Arguments
X
Data.frame or matrix
with observations corresponding to rows and variables to columns.
vecd.ou.p
For the mutual independence problem 1), a vector
giving the sizes of each subvector. For the serial independence
problem 2), an integer indicating the number of consecutive observations.
N
Integer. Number of points of the discretization to obtain
directions on the sphere in order to
evaluate the value of the test statistic.
B
Integer. Number of bootstrap replications. Note that B can be slightly modified if nbclus
>1
alpha
Double. Level of the test.
display
Logical. TRUE to display the values of the A-dependence statistic.
graphics
Logical. TRUE to plot the dependogram.
nbclus
Integer. Number of nodes in the cluster. Used only for parallel computations.
Value
A list with the following components:
In the mutual independence case:
norm.RnA
... should be completed ...
Rn
... should be completed ...
rA
... should be completed ...
r
... should be completed ...
RnAsstar
... should be completed ...
In the serial case:
norm.SnA
... should be completed ...
Sn
... should be completed ...
sA
... should be completed ...
s
... should be completed ...
RnAsstar
... should be completed ...
Author(s)
M. Bilodeau, P. Lafaye de Micheaux
Examples
n <- 100
W1 <- rpois(n,1)
W3 <- rpois(n,1)
W4 <- rpois(n,1)
W6 <- rpois(n,1)
W2 <- rpois(n,3)
W5 <- rpois(n,3)
X1 <- W1 + W2
X2 <- W2 + W3
X3 <- W4 + W5
X4 <- W5 + W6
X <- cbind(X1,X2,X3,X4)
dependogram(X,vecd.ou.p=c(1,1,1,1),N=10,B=20,alpha=0.05,display=TRUE,graphics=TRUE)
n <- 50
Sigma <- matrix(c(1, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0,
0, 0, 1, 0,.4,.5,
0, 0, 0, 1,.1,.2,
0, 0,.4,.1, 1, 0,
0, 0,.5,.2, 0, 1),nrow=6,ncol=6,byrow=TRUE)
W <- chol(Sigma)
X1 <- cbind(W[1,],W[2,])
X2 <- cbind(W[3,],W[4,])
X3 <- cbind(W[5,],W[6,])
X <- cbind(X1,X2,X3)
dependogram(X,vecd.ou.p=c(2,2,2),N=10,B=20,alpha=0.05,display=TRUE,graphics=TRUE)
n <- 100
W <- sample(x=1:8,size=n,TRUE)
X1 <- W
X2 <- W
X3 <- W
X4 <- W
X <- cbind(X1,X2,X3,X4)
dependogram(X,vecd.ou.p=c(1,1,1,1),N=10,B=20,alpha=0.05,display=TRUE,graphics=TRUE)
n <- 100
W <- rbinom(n,1,0.8)
Y <- W[1:(n-3)]*W[4:n]
dependogram(W,vecd.ou.p=4,N=10,B=20,alpha=0.05,display=TRUE,graphics=TRUE)
dependogram(Y,vecd.ou.p=4,N=10,B=20,alpha=0.05,display=TRUE,graphics=TRUE)
n <- 75
U <- matrix(rnorm(2*n),nrow=n,ncol=2)
W <- U[1:(n-1),] + sqrt(2)*U[2:n,]
Y <- W/apply(W,MARGIN=1,FUN=function(x) sqrt(x[1]^2+x[2]^2))
dependogram(Y,vecd.ou.p=3,N=10,B=20,alpha=0.05,display=TRUE,graphics=TRUE)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(IndependenceTests)
Loading required package: xtable
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/IndependenceTests/dependogram.Rd_%03d_medium.png", width=480, height=480)
> ### Name: dependogram
> ### Title: Nonparametric tests of independence between random vectors
> ### Aliases: dependogram
>
> ### ** Examples
>
>
>
> n <- 100
> W1 <- rpois(n,1)
> W3 <- rpois(n,1)
> W4 <- rpois(n,1)
> W6 <- rpois(n,1)
> W2 <- rpois(n,3)
> W5 <- rpois(n,3)
> X1 <- W1 + W2
> X2 <- W2 + W3
> X3 <- W4 + W5
> X4 <- W5 + W6
> X <- cbind(X1,X2,X3,X4)
> dependogram(X,vecd.ou.p=c(1,1,1,1),N=10,B=20,alpha=0.05,display=TRUE,graphics=TRUE)
1 : A= 1 2 : ||RnA||= 1.604
2 : A= 1 3 : ||RnA||= 0.456
3 : A= 1 4 : ||RnA||= 0.2
4 : A= 2 3 : ||RnA||= 0.264
5 : A= 2 4 : ||RnA||= 0.212
6 : A= 3 4 : ||RnA||= 1.692
7 : A= 1 2 3 : ||RnA||= 0.191
8 : A= 1 2 4 : ||RnA||= 0.18
9 : A= 1 3 4 : ||RnA||= 0.173
10 : A= 2 3 4 : ||RnA||= 0.13
11 : A= 1 2 3 4 : ||RnA||= 0.285
$norm.RnA
[1] 1.6040000 0.4560000 0.2000000 0.2640000 0.2120000 1.6920000 0.1910000
[8] 0.1803200 0.1730000 0.1298400 0.2853096
$Rn
[1] 1.692
$rA
[1] 0.724000 0.628000 0.720000 0.578000 0.568000 0.633000 0.391200 0.360200
[9] 0.392000 0.314000 0.169152
$r
[1] 0.72
$RnAsstar
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 0.3020000 0.7240000 0.386000 0.5450000 0.292000 0.478000 0.64700 0.283000
[2,] 0.4880000 0.1680000 0.376000 0.4520000 0.264000 0.274000 0.22200 0.449000
[3,] 0.4120000 0.3890000 0.320000 0.4930000 0.290000 0.221000 0.44000 0.340000
[4,] 0.4740000 0.3160000 0.302000 0.2820000 0.308000 0.236000 0.27500 0.252000
[5,] 0.4260000 0.4240000 0.552000 0.1980000 0.306000 0.422000 0.26200 0.284000
[6,] 0.3680000 0.3130000 0.360000 0.3010000 0.444000 0.450000 0.41400 0.419000
[7,] 0.2544000 0.2859600 0.209560 0.2986800 0.279000 0.127000 0.25030 0.391200
[8,] 0.2870000 0.1826800 0.217120 0.3602000 0.210800 0.240620 0.30600 0.166920
[9,] 0.2084800 0.2639600 0.391800 0.1777600 0.241800 0.265600 0.22160 0.349560
[10,] 0.2388000 0.2628800 0.184080 0.2105200 0.194080 0.184200 0.20720 0.125240
[11,] 0.1459736 0.1337112 0.169152 0.0907445 0.116984 0.106128 0.10853 0.136016
[,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16]
[1,] 0.3360000 0.3400000 0.3040000 0.33500 0.2540000 0.18000 0.42000 0.2940000
[2,] 0.4380000 0.4140000 0.4000000 0.33200 0.3970000 0.42800 0.32800 0.3730000
[3,] 0.3200000 0.4560000 0.4440000 0.30200 0.3010000 0.34000 0.58000 0.3970000
[4,] 0.4560000 0.4070000 0.2600000 0.43600 0.3530000 0.30800 0.34000 0.5430000
[5,] 0.3760000 0.4680000 0.5680000 0.32500 0.3060000 0.24700 0.27000 0.3620000
[6,] 0.3600000 0.3580000 0.6000000 0.46000 0.2780000 0.63300 0.42400 0.5800000
[7,] 0.1851200 0.1973600 0.1864000 0.23480 0.3187400 0.21528 0.20480 0.2340000
[8,] 0.2419200 0.1976400 0.2239600 0.24080 0.2610000 0.24400 0.29600 0.1777200
[9,] 0.2260000 0.2304400 0.2682000 0.17916 0.2441800 0.25232 0.19920 0.1853600
[10,] 0.2528400 0.1715600 0.2008800 0.22980 0.2065000 0.18912 0.31400 0.1495200
[11,] 0.1509684 0.1285292 0.1052422 0.10178 0.1520925 0.12208 0.13361 0.1090282
[,17] [,18] [,19] [,20]
[1,] 0.28000 0.3060000 0.276000 0.460000
[2,] 0.50200 0.6280000 0.360000 0.324000
[3,] 0.56000 0.4120000 0.378000 0.720000
[4,] 0.35000 0.3000000 0.578000 0.420000
[5,] 0.27700 0.3400000 0.404000 0.480000
[6,] 0.35000 0.3560000 0.416000 0.366000
[7,] 0.18528 0.3162400 0.234400 0.205920
[8,] 0.18004 0.2130000 0.176800 0.252000
[9,] 0.25200 0.3920000 0.177800 0.195360
[10,] 0.20412 0.2692000 0.254800 0.222480
[11,] 0.12533 0.1315728 0.130632 0.121866
>
> n <- 50
> Sigma <- matrix(c(1, 0, 0, 0, 0, 0,
+ 0, 1, 0, 0, 0, 0,
+ 0, 0, 1, 0,.4,.5,
+ 0, 0, 0, 1,.1,.2,
+ 0, 0,.4,.1, 1, 0,
+ 0, 0,.5,.2, 0, 1),nrow=6,ncol=6,byrow=TRUE)
> W <- chol(Sigma)
> X1 <- cbind(W[1,],W[2,])
> X2 <- cbind(W[3,],W[4,])
> X3 <- cbind(W[5,],W[6,])
> X <- cbind(X1,X2,X3)
> ## No test:
> dependogram(X,vecd.ou.p=c(2,2,2),N=10,B=20,alpha=0.05,display=TRUE,graphics=TRUE)
1 : A= 1 2 : ||RnA||= 0.544
2 : A= 1 3 : ||RnA||= 0.272
3 : A= 2 3 : ||RnA||= 0.408
4 : A= 1 2 3 : ||RnA||= 0.181
$norm.RnA
[1] 0.5443311 0.2721655 0.4082483 0.1814437
$Rn
[1] 0.5443311
$rA
[1] 0.6123724 0.5443311 0.6123724 0.2721655
$r
[1] 0.6123724
$RnAsstar
[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,] 0.0000000 0.20412415 0.3402069 0.0000000 0.3402069 0.4082483 0.4082483
[2,] 0.0000000 0.34020691 0.1360828 0.2041241 0.2041241 0.2721655 0.4082483
[3,] 0.2721655 0.06804138 0.5443311 0.2721655 0.5443311 0.2721655 0.2041241
[4,] 0.0000000 0.04536092 0.1360828 0.1360828 0.2041241 0.2041241 0.2041241
[,8] [,9] [,10] [,11] [,12] [,13] [,14]
[1,] 0.4082483 0.2721655 0.4082483 0.6123724 0.3402069 0.0000000 0.3402069
[2,] 0.4082483 0.4082483 0.5443311 0.4082483 0.2721655 0.0000000 0.1360828
[3,] 0.4082483 0.4082483 0.3402069 0.5443311 0.4082483 0.4082483 0.4082483
[4,] 0.2721655 0.1360828 0.2041241 0.1360828 0.1814437 0.0000000 0.1134023
[,15] [,16] [,17] [,18] [,19] [,20]
[1,] 0.2721655 0.5443311 0.20412415 0.2721655 0.34020691 0.5443311
[2,] 0.2041241 0.3402069 0.06804138 0.3402069 0.13608276 0.4082483
[3,] 0.5443311 0.6123724 0.20412415 0.2041241 0.27216553 0.5443311
[4,] 0.1360828 0.2721655 0.06804138 0.1360828 0.09072184 0.1360828
> ## End(No test)
>
> n <- 100
> W <- sample(x=1:8,size=n,TRUE)
> X1 <- W
> X2 <- W
> X3 <- W
> X4 <- W
> X <- cbind(X1,X2,X3,X4)
> dependogram(X,vecd.ou.p=c(1,1,1,1),N=10,B=20,alpha=0.05,display=TRUE,graphics=TRUE)
1 : A= 1 2 : ||RnA||= 2.484
2 : A= 1 3 : ||RnA||= 2.484
3 : A= 1 4 : ||RnA||= 2.484
4 : A= 2 3 : ||RnA||= 2.484
5 : A= 2 4 : ||RnA||= 2.484
6 : A= 3 4 : ||RnA||= 2.484
7 : A= 1 2 3 : ||RnA||= 0.961
8 : A= 1 2 4 : ||RnA||= 0.961
9 : A= 1 3 4 : ||RnA||= 0.961
10 : A= 2 3 4 : ||RnA||= 0.961
11 : A= 1 2 3 4 : ||RnA||= 0.833
$norm.RnA
[1] 2.4840000 2.4840000 2.4840000 2.4840000 2.4840000 2.4840000 0.9609600
[8] 0.9609600 0.9609600 0.9609600 0.8326032
$Rn
[1] 2.484
$rA
[1] 0.6010000 0.6520000 0.8000000 0.6720000 0.7780000 0.5600000 0.3205000
[8] 0.3780000 0.3005600 0.3470000 0.1967264
$r
[1] 0.778
$RnAsstar
[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,] 0.2920000 0.4040000 0.5520000 0.348000 0.4680000 0.402000 0.425000
[2,] 0.2940000 0.2960000 0.4000000 0.450000 0.4200000 0.484000 0.343000
[3,] 0.4610000 0.2620000 0.5840000 0.465000 0.5320000 0.466000 0.452000
[4,] 0.5480000 0.3440000 0.6720000 0.480000 0.4840000 0.500000 0.350000
[5,] 0.3360000 0.3630000 0.5040000 0.625000 0.4650000 0.354000 0.375000
[6,] 0.4540000 0.4160000 0.5250000 0.560000 0.3510000 0.359000 0.375000
[7,] 0.2423600 0.1652000 0.2250000 0.263700 0.2036400 0.310100 0.233000
[8,] 0.2126000 0.2255200 0.2723200 0.225000 0.2014600 0.220600 0.317140
[9,] 0.2332000 0.2176000 0.2557600 0.296140 0.2278400 0.195000 0.274800
[10,] 0.2496000 0.2460800 0.2608000 0.264800 0.2132400 0.275000 0.191600
[11,] 0.1331016 0.1927312 0.1193712 0.134613 0.1222408 0.113592 0.167546
[,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15]
[1,] 0.4760000 0.300000 0.35600 0.37000 0.270000 0.4210000 0.414000 0.424000
[2,] 0.2930000 0.488000 0.46800 0.59500 0.420000 0.4510000 0.384000 0.248000
[3,] 0.2080000 0.287000 0.23200 0.39000 0.383000 0.4820000 0.424000 0.800000
[4,] 0.4720000 0.360000 0.30200 0.42000 0.556000 0.2700000 0.488000 0.415000
[5,] 0.6580000 0.430000 0.36600 0.49000 0.689000 0.2860000 0.352000 0.505000
[6,] 0.3920000 0.338000 0.24000 0.50600 0.321000 0.4340000 0.339000 0.512000
[7,] 0.1878000 0.230480 0.28800 0.17892 0.314640 0.1889600 0.208400 0.176360
[8,] 0.2573200 0.378000 0.21880 0.30630 0.167480 0.2459400 0.247800 0.213500
[9,] 0.1805600 0.218640 0.30056 0.24100 0.290560 0.2330800 0.295420 0.227840
[10,] 0.2365200 0.226520 0.27872 0.34700 0.174400 0.2978000 0.207200 0.247000
[11,] 0.1535536 0.098688 0.13476 0.10727 0.135288 0.1115188 0.118072 0.138476
[,16] [,17] [,18] [,19] [,20]
[1,] 0.353000 0.288000 0.51000 0.3320000 0.6010000
[2,] 0.652000 0.299000 0.44000 0.3580000 0.3520000
[3,] 0.328000 0.600000 0.36400 0.5170000 0.6480000
[4,] 0.238000 0.400000 0.34000 0.5350000 0.5160000
[5,] 0.402000 0.460000 0.25500 0.4300000 0.7780000
[6,] 0.315000 0.550000 0.41800 0.2780000 0.2840000
[7,] 0.218920 0.320500 0.24376 0.1628000 0.2250000
[8,] 0.244000 0.214840 0.23072 0.2486000 0.2707200
[9,] 0.180800 0.249960 0.22120 0.2238000 0.1934400
[10,] 0.340100 0.234400 0.30840 0.2283000 0.2638400
[11,] 0.133261 0.132834 0.13008 0.0857008 0.1967264
>
> n <- 100
> W <- rbinom(n,1,0.8)
> Y <- W[1:(n-3)]*W[4:n]
> dependogram(W,vecd.ou.p=4,N=10,B=20,alpha=0.05,display=TRUE,graphics=TRUE)
1 : A= 1 2 : ||SnA||= 0.046
2 : A= 1 3 : ||SnA||= 0.055
3 : A= 1 4 : ||SnA||= 0.046
4 : A= 1 2 3 : ||SnA||= 0.182
5 : A= 1 2 4 : ||SnA||= 0.021
6 : A= 1 3 4 : ||SnA||= 0.08
7 : A= 1 2 3 4 : ||SnA||= 0.026
$norm.SnA
[1] 0.04605694 0.05547768 0.04605694 0.18199397 0.02107526 0.08045936 0.02586523
$Sn
[1] 0.181994
$sA
[1] 0.4951121 0.1758861 0.1183767
$s
[1] 0.38311
$SnAsstar
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 0.016747978 0.20620948 0.339146554 0.28052863 0.024075218 0.05547768
[2,] 0.186321255 0.02407522 0.085833387 0.22714445 0.147591556 0.24912617
[3,] 0.084786639 0.17899401 0.339146554 0.02407522 0.249126172 0.13503057
[4,] 0.055876952 0.09281531 0.043510211 0.03449954 0.047060523 0.02831617
[5,] 0.072624930 0.09281531 0.050502923 0.10567845 0.009463903 0.08986930
[6,] 0.031003183 0.09086210 0.043510211 0.10044470 0.007273284 0.11005968
[7,] 0.008773375 0.05465065 0.005895345 0.05346728 0.036099867 0.01408744
[,7] [,8] [,9] [,10] [,11] [,12]
[1,] 0.028262213 0.05547768 0.495112099 0.04501019 0.03454270 0.003140246
[2,] 0.073272404 0.15701229 0.292042866 0.25959366 0.16852653 0.003140246
[3,] 0.231331446 0.04605694 0.088973633 0.08269314 0.13607732 0.033495956
[4,] 0.030798150 0.04192390 0.156958337 0.09228654 0.08138740 0.029460039
[5,] 0.008978297 0.03762899 0.139163611 0.16044390 0.03898869 0.081430568
[6,] 0.008978297 0.06390562 0.037628994 0.06204953 0.06254593 0.020104048
[7,] 0.029552265 0.02256578 0.007666663 0.07632565 0.01954635 0.118376712
[,13] [,14] [,15] [,16] [,17] [,18]
[1,] 1.465448e-01 0.093160628 0.132937075 0.095254125 0.102581365 0.0198882239
[2,] 5.652443e-02 0.109908606 0.006280492 0.107815108 0.100487868 0.0994411193
[3,] 1.727135e-01 0.008373989 0.095254125 0.006280492 0.001046749 0.2009757358
[4,] 6.107832e-03 0.055876952 0.007165372 0.175886142 0.138645632 0.0610675305
[5,] 9.938716e-02 0.026567991 0.143566430 0.049229559 0.087452071 0.0059243814
[6,] 5.395611e-05 0.026567991 0.052305058 0.052305058 0.014082546 0.0007338032
[7,] 1.876126e-02 0.025056997 0.027025895 0.017741994 0.014643356 0.0192642242
[,19] [,20]
[1,] 0.002093497 0.38311000
[2,] 0.099441119 0.15701229
[3,] 0.099441119 0.18946150
[4,] 0.036323256 0.05760355
[5,] 0.018528530 0.09167144
[6,] 0.083006087 0.00644236
[7,] 0.001110161 0.05136166
> dependogram(Y,vecd.ou.p=4,N=10,B=20,alpha=0.05,display=TRUE,graphics=TRUE)
1 : A= 1 2 : ||SnA||= 0.061
2 : A= 1 3 : ||SnA||= 0.042
3 : A= 1 4 : ||SnA||= 1.073
4 : A= 1 2 3 : ||SnA||= 0.209
5 : A= 1 2 4 : ||SnA||= 0.127
6 : A= 1 3 4 : ||SnA||= 0.036
7 : A= 1 2 3 4 : ||SnA||= 0.096
$norm.SnA
[1] 0.06144637 0.04169575 1.07311700 0.20920249 0.12655805 0.03583594 0.09569975
$Sn
[1] 1.073117
$sA
[1] 0.6210473 0.2483535 0.1018472
$s
[1] 0.5738652
$SnAsstar
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 0.04608478 0.06144637 0.0449875224 0.13715708 0.47401487 0.092169558
[2,] 0.01206982 0.35112213 0.2644388514 0.22822938 0.24798000 0.229326639
[3,] 0.25236903 0.16458850 0.2918702676 0.24029921 0.01316708 0.092169558
[4,] 0.13097042 0.18910168 0.0068870364 0.08371835 0.15095450 0.003735342
[5,] 0.01893351 0.06546186 0.0004435718 0.04648166 0.04085530 0.027011190
[6,] 0.14413750 0.24835354 0.2100195910 0.14077569 0.10946886 0.003735342
[7,] 0.09139095 0.08517076 0.0265099987 0.06742540 0.01420076 0.036561893
[,7] [,8] [,9] [,10] [,11] [,12]
[1,] 0.01865336 0.13386531 0.311620887 0.07900248 0.573865225 0.20628425
[2,] 0.01865336 0.27431416 0.621047261 0.01755611 0.098753098 0.25785531
[3,] 0.18763089 0.10094761 0.002194513 0.18872814 0.004389027 0.00000000
[4,] 0.05278505 0.11395127 0.015408285 0.21366155 0.031983864 0.13057354
[5,] 0.23908522 0.01694911 0.139304902 0.11332093 0.028692094 0.05815460
[6,] 0.17348328 0.20133492 0.063687577 0.01797633 0.210416471 0.17226929
[7,] 0.01068335 0.04361061 0.101847173 0.02939942 0.030694128 0.04586299
[,13] [,14] [,15] [,16] [,17] [,18]
[1,] 0.08119699 0.16019947 0.10094761 0.228229382 0.2413964619 0.02413965
[2,] 0.33137151 0.14922690 0.20847876 0.182144603 0.3390523033 0.38842885
[3,] 0.27541142 0.41476301 0.26334159 0.070224425 0.5069325700 0.03291770
[4,] 0.06268370 0.01356396 0.08087015 0.226992050 0.1190873648 0.21543584
[5,] 0.05014696 0.02934578 0.09244971 0.005976547 0.0002334589 0.06824002
[6,] 0.05014696 0.07379635 0.01398419 0.070434538 0.0004202259 0.17973998
[7,] 0.04752949 0.04280816 0.03183584 0.040900254 0.0523827044 0.06841437
[,19] [,20]
[1,] 0.49815452 4.580430e-17
[2,] 0.29187027 3.609974e-01
[3,] 0.39501239 1.031421e-01
[4,] 0.06957074 2.359102e-01
[5,] 0.07197537 1.020449e-01
[6,] 0.02897224 2.413965e-02
[7,] 0.01119361 6.005729e-02
>
> n <- 75
> U <- matrix(rnorm(2*n),nrow=n,ncol=2)
> W <- U[1:(n-1),] + sqrt(2)*U[2:n,]
> Y <- W/apply(W,MARGIN=1,FUN=function(x) sqrt(x[1]^2+x[2]^2))
> ## No test:
> dependogram(Y,vecd.ou.p=3,N=10,B=20,alpha=0.05,display=TRUE,graphics=TRUE)
1 : A= 1 2 : ||SnA||= 1.267
2 : A= 1 3 : ||SnA||= 0.694
3 : A= 1 2 3 : ||SnA||= 0.442
$norm.SnA
[1] 1.2668996 0.6940122 0.4424873
$Sn
[1] 1.2669
$sA
[1] 0.9542668 0.5614297
$s
[1] 0.9542668
$SnAsstar
[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,] 0.7922215 1.0541129 0.7660323 0.7660323 0.7725796 0.6383603 0.8838835
[2,] 0.9542668 0.5630665 0.6432708 0.8200474 0.7562114 0.8806098 0.6743704
[3,] 0.5614297 0.4182078 0.4190262 0.3875174 0.4484890 0.3756505 0.4550363
[,8] [,9] [,10] [,11] [,12] [,13] [,14]
[1,] 0.8380525 0.7791269 0.7922215 0.7807637 0.8904308 0.6547285 0.8937044
[2,] 0.7332959 0.6678231 0.7332959 0.6776440 0.6760072 0.8740625 0.5827084
[3,] 0.4026580 0.3846530 0.4124790 0.3993844 0.4152070 0.4724048 0.4308477
[,15] [,16] [,17] [,18] [,19] [,20]
[1,] 0.8102265 0.6727335 0.7169277 0.6727335 0.8789730 0.8986149
[2,] 0.7332959 0.6841913 0.6334498 0.6154448 0.6416339 0.7954951
[3,] 0.4664941 0.4428966 0.4572187 0.4157526 0.3906547 0.4036583
> ## End(No test)
>
>
>
>
>
> dev.off()
null device
1
>