Performs test based on Multiple Random Dot Product Graph
multiRDPG_test
calculates the likelihood ratio test for whether a set of graphs comes from the same disribution.
multiRDPG_test(A, d, maxiter = 100, tol = 1e-06, B = 1000)
A
: List of symmetric A matricesd
: Dimension of the latent spacemaxiter
: Maximum number of iterations in the fit of multiRDPG. Default is 100.tol
: Tolerance for the step in the objective function in multiRDPG. Default is 1e-6.B
: Number of permutation iterations. Default is 1000.Returns a list of the following elements:
pvalue | Estimated p-values |
Tval | Value of the test statistic |
Tstar | Vector of the test statistic for each permutation iteration |
nullmodel | Model fit under the null |
altmodel | Modelfit under the alternative |
#simulate data U <- matrix(0, nrow=20, ncol=3) U[,1] <- 1/sqrt(20) U[,2] <- rep(c(1,-1), 10)/sqrt(20) U[,3] <- rep(c(1,1,-1,-1), 5)/sqrt(20) L<-list(diag(c(11,6,2)),diag(c(15,4,1))) A <- list() for(i in 1:2){ P <- U%*%L[[i]]%*%t(U) A[[i]] <-apply(P,c(1,2),function(x){rbinom(1,1,x)}) A[[i]][lower.tri(A[[i]])]<-t(A[[i]])[lower.tri(A[[i]])] } #perform test multiRDPG_test(A,3,B=100)
multiRDPG
Agnes Martine Nielsen (agni@dtu.dk)
Useful links