Commit | Line | Data |
---|---|---|
3f62d540 | 1 | p = 10 |
64b28e3e | 2 | q = 8 |
3f62d540 | 3 | k = 2 |
4 | D = 20 | |
5 | ||
f72201cc BA |
6 | meanX = matrix(nrow=p,ncol=k) |
7 | meanX[,1] = rep(0,p) | |
8 | meanX[,2] = rep(1,p) | |
9 | ||
10 | covX = array(dim=c(p,p,k)) | |
11 | covX[,,1] = 0.1*diag(p) | |
12 | covX[,,2] = 0.5*diag(p) | |
f227455a | 13 | |
3f62d540 | 14 | covY = array(dim = c(q,q,k)) |
15 | covY[,,1] = 0.1*diag(q) | |
16 | covY[,,2] = 0.2*diag(q) | |
f227455a | 17 | |
3f62d540 | 18 | beta = array(dim = c(p,q,2)) |
19 | beta[,,2] = matrix(c(rep(2,(D)),rep(0, p*q-D))) | |
20 | beta[,,1] = matrix(c(rep(1,D),rep(0, p*q-D))) | |
f227455a | 21 | |
3f62d540 | 22 | n = 100 |
f227455a | 23 | |
24 | pi = c(0.4,0.6) | |
25 | ||
f227455a | 26 | data = generateXY(meanX,covX,covY, pi, beta, n) |
27 | ||
28 | X = data$X | |
29 | Y = data$Y | |
30 | ||
3f62d540 | 31 | res_valse = valse(X,Y) |