Description Usage Arguments Value Author(s) See Also Examples
nullestimation
calculates the estimation under the null hypothesis
1 | nullestimation(A, d)
|
A |
List of symmetric A matrices |
d |
Dimension of the latent space |
Returns a list of the following
U | The common latent space vectors. U in R^n x d |
Lambda | List of Lambdas. Each is a positive diagonal matrix of size d x d. |
Agnes Martine Nielsen (agni@dtu.dk)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #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]])]
}
#fit model
nullestimation(A,3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.