Title: | CONCOR for Structural- And Regular-Equivalence Blockmodeling |
Version: | 2.0.0 |
Description: | The four functions svdcp() ('cp' for column partitioned), svdbip() or svdbip2() ('bip' for bipartitioned), and svdbips() ('s' for a simultaneous optimization of a set of 'r' solutions), correspond to a singular value decomposition (SVD) by blocks notion, by supposing each block depending on relative subspaces, rather than on two whole spaces as usual SVD does. The other functions, based on this notion, are relative to two column partitioned data matrices x and y defining two sets of subsets x_i and y_j of variables and amount to estimate a link between x_i and y_j for the pair (x_i, y_j) relatively to the links associated to all the other pairs. These methods were first presented in: Lafosse R. & Hanafi M.,(1997) https://eudml.org/doc/106424 and Hanafi M. & Lafosse, R. (2001) https://eudml.org/doc/106494. |
License: | GPL (≥ 3) |
URL: | https://fatelarico.github.io/BMconcor/ |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.1 |
NeedsCompilation: | no |
Packaged: | 2024-05-01 09:32:49 UTC; fabio |
Author: | Roger Lafosse [aut],
Fabio Ashtar Telarico
|
Maintainer: | Fabio Ashtar Telarico <Fabio-Ashtar.Telarico@fdv.uni-lj.si> |
Repository: | CRAN |
Date/Publication: | 2024-05-02 13:22:42 UTC |
Relative links of several subsets of variables
Description
Relative links of several subsets of variables Yj with another set X. SUCCESSIVE SOLUTIONS
Usage
concor(x, y, py, r)
Arguments
x |
are the |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions |
Details
The first solution calculates 1+kx normed vectors: the vector u[:,1]
of Rp associated to the ky vectors vi[:,1]
's of Rqi,
by maximizing \sum_i \mbox{cov}(x*u[,k],y_i*v_i[,k])^2
, with 1+ky norm constraints on the axes.
A component (x)(u[,k])
is associated to ky partial components (yi)(vi)[,k]
and to a global component y*V[,k]
.
\mbox{cov}((x)(u[,k]),(y)(V[,k]))^2 = \sum \mbox{cov}((x)(u[,k]),(y_i)(v_i[,k]))^2
.
(y)(V[,k])
is a global component of the components (yi)(vi[,k])
.
The second solution is obtained from the same criterion, but after replacing each yi by y_i-(y_i)(v_i[,1])(v_i[,1]')
.
And so on for the successive solutions 1,2,...,r. The biggest number of solutions may be r = inf(n, p, qi), when the (x')(yi')(s)
are supposed with full rank; then rmax = min(c(min(py),n,p)). For a set of r solutions, the matrix u'X'YV is diagonal and the
matrices u'X'Yjvj are triangular (good partition of the link by the solutions).
concor.m is the svdcp.m function applied to the matrix x'y.
Value
A list
with following components:
u |
A |
v |
A |
V |
A |
cov2 |
A |
Author(s)
Lafosse, R.
References
Lafosse R. & Hanafi M.(1997) Concordance d'un tableau avec K tableaux: Definition de K+1 uples synthetiques. Revue de Statistique Appliquee vol.45,n.4.
Examples
# To make some "GPA" : so, by posing the compromise X = Y,
# "procrustes" rotations to the "compromise X" then are :
# Yj*(vj*u').
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9)
x <- scale(x);y <- scale(y)
co <- concor(x,y,c(3,2,4),2)
Canonical analysis of several sets with another set
Description
Relative proximities of several subsets of variables Yj with another set X. SUCCESSIVE SOLUTIONS
Usage
concorcano(x, y, py, r)
Arguments
x |
are the |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions |
Details
The first solution calculates a standardized canonical component cx[,1]
of x associated to ky
standardized components cyi[,1]
of yi by maximizing \sum_i \rho(cx[,1],cy_i[,1])^2
.
The second solution is obtained from the same criterion, with ky
orthogonality constraints for having rho(cyi[,1],cyi[,2])=0
(that
implies rho(cx[,1],cx[,2])=0)
. For each of the 1+ky sets, the r
canonical components are 2 by 2 zero correlated.
The ky matrices (cx)'*cyi are triangular.
This function uses concor function.
Value
A list
with following components:
cx |
a |
cy |
a |
rho2 |
a |
Author(s)
Lafosse, R.
References
Hanafi & Lafosse (2001) Generalisation de la regression lineaire simple pour analyser la dependance de K ensembles de variables avec un K+1 eme. Revue de Statistique Appliquee vol.49, n.1
Examples
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9)
x <- scale(x);y <- scale(y)
ca <- concorcano(x,y,c(3,2,4),2)
Redundancy of sets yj by one set x
Description
Regression of several subsets of variables Yj by another set X. SUCCESSIVE SOLUTIONS
Usage
concoreg(x, y, py, r)
Arguments
x |
are the |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions |
Value
A list
with following components:
cx |
a |
v |
is a |
V |
is a |
varexp |
is a |
Author(s)
Lafosse, R.
References
Lafosse R. & Hanafi M.(1997) Concordance d'un tableau avec K tableaux: Definition de K+1 uples synthetiques. Revue de Statistique Appliquee vol.45,n.4.
Chessel D. & Hanafi M. (1996) Analyses de la Co-inertie de K nuages de points. Revue de Statistique Appliquee vol.44, n.2. (this ACOM analysis of one multiset is obtained by the command : concoreg(Y,Y,py,r))
Examples
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9)
x <- scale(x);y <- scale(y)
co <- concoreg(x,y,c(3,2,4),2)
Analyzing a set of partial links between Xi and Yj
Description
Analyzing a set of partial links between Xi and Yj, SUCCESSIVE SOLUTIONS
Usage
concorgm(x, px, y, py, r)
Arguments
x |
are the |
px |
A row vector which contains the numbers pi, i=1,...,kx, of the kx subsets xi of x : sum(pi)=sum(px)=p. px is the partition vector of x |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions rmax <= min(min(px),min(py),n) |
Details
The first solution calculates 1+kx normed vectors: the vector u[:,1]
of Rp associated to the ky vectors vi[:,1]
's of Rqi,
by maximizing sum(cov((x)(u[,k]),(y_i)(v_i[,k]))^2)
, with 1+ky norm constraints on the axes.
A component (x)(u[,k])
is associated to ky partial components (yi)(vi)[,k]
and to a global component y*V[,k]
.
cov((x)(u[,k]),(y)(V[,k]))^2 = sum(cov((x)(u[,k]),(y_i)(v_i[,k]))^2)(y)(V[,k])
is a global component of the components (yi)(vi[,k])
.
The second solution is obtained from the same criterion, but after replacing each yi by y_i-(y_i)(v_i[,1])(v_i[,1]')
.
And so on for the successive solutions 1,2,...,r. The biggest number of solutions may be r=inf(n, p, qi), when the (x')(yi')(s)
are supposed with full rank; then rmax=min(c(min(py),n,p)). For a set of r solutions, the matrix u'X'YV is diagonal and the
matrices u'X'Yjvj are triangular (good partition of the link by the solutions).
concor.m is the svdcp.m function applied to the matrix x'y.
Value
A list
with following components:
u |
a |
v |
a |
cov2 |
a |
Author(s)
Lafosse, R.
References
Kissita, Cazes, Hanafi & Lafosse (2004) Deux methodes d'analyse factorielle du lien entre deux tableaux de variables partitionn?es. Revue de Statistique Appliqu?e, Vol 52, n. 3, 73-92.
Examples
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9)
x <- scale(x);y <- scale(y)
cg <- concorgm(x,c(2,3),y,c(3,2,4),2)
cg$cov2[1,1,]
Canonical analysis of subsets Yj with subsets Xi
Description
Canonical analysis of subsets Yj with subsets Xi. Relative valuations by squared correlations of the proximities of subsets Xi with subsets Yj. SUCCESSIVE SOLUTIONS
Usage
concorgmcano(x, px, y, py, r)
Arguments
x |
are the |
px |
The row vector which contains the numbers pi, i=1,...,kx, of the kx subsets xi of x : |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions rmax <= min(min(px),min(py),n) |
Details
For the first solution, sum_i sum_j \mbox{rho2}(cx_i[,1],cy_j[,1])
is the optimized
criterion. The other solutions are calculated from the same criterion, but with
orthogonalities for having two by two zero correlated the canonical components defined for
each xi, and also for those defined for each yj. Each solution associates kx canonical
components to ky canonical components. When kx =1 (px=p), take concorcano
function
This function uses the concorgm function
Value
A list
with following components:
cx |
is a |
cy |
is a |
rho2 |
is a |
Author(s)
Lafosse, R.
References
Kissita G., Analyse canonique generalisee avec tableau de reference generalisee. Thesis, Ceremade Paris 9 Dauphine (2003).
Examples
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9)
x <- scale(x);y <- scale(y)
cc <- concorgmcano(x,c(2,3),y,c(3,2,4),2)
cc$rho2[1,1,]
Regression of subsets Yj by subsets Xi
Description
Regression of subsets Yj by subsets Xi for comparing all the explanatory-explained pairs (Xi,Yj). SUCCESSIVE SOLUTIONS
Usage
concorgmreg(x, px, y, py, r)
Arguments
x |
are the |
px |
A row vector which contains the numbers pi, i = 1,...,kx, of the kx subsets xi of x : sum(pi)=sum(px)=p. px is the partition vector of x |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions |
Details
For the first solution, \sum_i \sum_j \mbox{rho2}(cx_i[,1],y_j*v_j[,1])
\mbox{var}(y_j*v_j[,1])
is the optimized criterion. The second solution is
calculated from the same criterion, but with y_j-y_j*v_j[,1]*v_j[,1]'
instead of the matrices yj and with orthogonalities for having two by
two zero correlated the explanatory components defined for each matrix
xi. And so on for the other solutions. One solution k associates kx
explanatory components (in cx[,k]
) to ky explained components. When
kx =1 (px = p), take concoreg function
This function uses the concorgm function
Value
A list
with following components:
cx |
a |
v |
is a |
varexp |
is a kx x ky x r array; for a fixed solution k, the matrix |
Author(s)
Lafosse, R.
References
Hanafi & Lafosse (2004) Regression of a multi-set by another based on an extension of the SVD. COMPSTAT'2004 Symposium
Examples
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9)
x <- scale(x);y <- scale(y)
cr <- concorgmreg(x,c(2,3),y,c(3,2,4),2)
cr$varexp[1,1,]
simultaneous concorgm
Description
concorgm with the set of r solutions simultaneously optimized
Usage
concors(x, px, y, py, r)
Arguments
x |
are the |
px |
A row vector which contains the numbers pi, i=1,...,kx, of the kx subsets xi of x : sum(pi)=sum(px)=p. px is the partition vector of x |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions rmax <= min(min(px),min(py),n) |
Details
This function uses the svdbips function
Value
A list
with following components:
u |
a |
v |
a |
cov2 |
a |
Author(s)
Lafosse, R.
References
Lafosse R. & Hanafi M.(1997) Concordance d'un tableau avec K tableaux: Definition de K+1 uples synthetiques. Revue de Statistique Appliquee vol.45,n.4.
Examples
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9)
x <- scale(x);y <- scale(y)
cs <- concors(x,c(2,3),y,c(3,2,4),2)
cs$cov2[1,1,]
simultaneous concorgmcano
Description
concorgmcano with the set of r solutions simultaneously optimized
Usage
concorscano(x, px, y, py, r)
Arguments
x |
are the |
px |
A row vector which contains the numbers pi, i=1,...,kx, of the kx subsets xi of x : sum(pi)=sum(px)=p. px is the partition vector of x |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions rmax <= min(min(px),min(py),n) |
Details
This function uses the concors function
Value
A list
with following components:
cx |
a |
cy |
a |
cov2 |
a |
Author(s)
Lafosse, R.
References
Hanafi & Lafosse (2001) Generalisation de la regression lineaire simple pour analyser la dependance de K ensembles de variables avec un K+1 eme. Revue de Statistique Appliquee vol.49, n.1
Examples
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9)
x <- scale(x);y <- scale(y)
cca <- concorscano(x,c(2,3),y,c(3,2,4),2)
cca$rho2[1,1,]
Redundancy of sets yj by one set x
Description
Regression of several subsets of variables Yj by another set X. SUCCESSIVE SOLUTIONS
Usage
concorsreg(x, px, y, py, r)
Arguments
x |
are the |
px |
The row vector which contains the numbers pi, i = 1,...,kx, of the kx subsets xi of x : |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions |
Value
A list
with following components:
cx |
a |
v |
is a |
varexp |
is a |
Author(s)
Lafosse, R.
Examples
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9)
x <- scale(x);y <- scale(y)
crs <- concorsreg(x,c(2,3),y,c(3,2,4),2)
crs$varexp[1,1,]
SVD for one bipartitioned matrix x
Description
SVD for bipartitioned matrix x. r successive Solutions
Usage
svdbip(x, K, H, r)
Arguments
x |
a |
K |
is a row vector which contains the numbers pk, k=1,...,kx, of the partition of x with kx row blocks : |
H |
is a row vector which contains the numbers qh, h=1,...,ky, of the partition of x with ky column blocks : sum(qh)=q |
r |
The number of wanted successive solutions |
Details
The first solution calculates kx+ky normed vectors: kx vectors uk[:,1]
of R^{p_k}
associated to ky vectors vh[:,1]
's of R^{q_h}
, by
maximizing \sum_k \sum_h (u_k[:,1]^prime*x_{kh}*v_h[:,1])^2
, with kx+ky
norm constraints. A value (u_k[,1]^prime*x_{kh}*v_h[,1])^2
measures the
relative link between R^{p_k}
and R^{q_h}
associated to the block xkh.
The second solution is obtained from the same criterion, but after
replacing each xhk by xkh-xkhvhvh'-ukuk'xkh+ukuk'xkhvhvh'. And
so on for the successive solutions 1,2,...,r . The biggest number of
solutions may be r=inf(pk,qh), when the xkh's are supposed with full
rank; then rmax=min([min(K),min(H)])
.
When K=p (or H=q, with t(x)), svdcp function is better. When H=q and
K=p, it is the usual svd (with squared singular values).
Convergence of algorithm may be not global. So the below proposed
initialisation of the algorithm may be not very suitable for some data
sets. Several different random initialisations with normed vectors
might be considered and the best result then choosen.
Value
A list
with following components:
u |
a |
v |
a |
s |
a |
Author(s)
Lafosse, R.
References
Kissita G., Cazes P., Hanafi M. & Lafosse (2004) Deux methodes d'analyse factorielle du lien entre deux tableaux de variables partitiones. Revue de Statistique Appliquee.
Examples
x <- matrix(runif(200),10,20)
s <- svdbip(x,c(3,4,3),c(5,15),3)
SVD for bipartitioned matrix x
Description
SVD for bipartitioned matrix x. r successive Solutions. As SVDBIP, but with another algorithm and another initialisation
Usage
svdbip2(x, K, H, r)
Arguments
x |
a |
K |
is a row vector which contains the numbers pk, k=1,...,kx, of the partition of x with kx row blocks : |
H |
is a row vector which contains the numbers qh, h=1,...,ky, of the partition of x with ky column blocks : sum(qh)=q |
r |
The number of wanted successive solutions |
Details
The first solution calculates kx+ky normed vectors: kx vectors
uk[:,1]
of Rpk associated to ky vectors vh[,1]
's of Rqh, by maximizing
\sum_k \sum_h (u_k[,1]'*x_{kh}*v_h[,1])^2
, with kx+ky norm
constraints. A value (u_k[,1]'*x_{kh}*v_h[,1])^2
measures the
relative link between R^{p_k}
and R^{q_h}
associated to the
block xkh.
The second solution is obtained from the same criterion, but after
replacing each xhk by xkh-xkhvhvh'-ukuk'xkh+ukuk'xkhvhvh'. And
so on for the successive solutions 1,2,...,r . The biggest number of
solutions may be r=inf(pk,qh), when the xkh's are supposed with full
rank; then rmax=min([min(K),min(H)])
.
When K=p (or H=q, with t(x)), svdcp function is better. When H=q and
K=p, it is the usual svd (with squared singular values).
Convergence of algorithm may be not global. So the below proposed
initialisation of the algorithm may be not very suitable for some data
sets. Several different random initialisations with normed vectors
might be considered and the best result then choosen
Value
A list
with following components:
u |
a |
v |
a |
s |
a |
Author(s)
Lafosse, R.
References
Kissita G., Analyse canonique generalisee avec tableau de reference generalisee. Thesis, Ceremade Paris 9 Dauphine (2003)
Examples
x <- matrix(runif(200),10,20)
s2 <- svdbip2(x,c(3,4,3),c(5,5,10),3);s2$s2
s1 <- svdbip(x,c(3,4,3),c(5,5,10),3);s1$s2
SVD for bipartitioned matrix x
Description
SVD for bipartitioned matrix x. SIMULTANEOUS SOLUTIONS. ("simultaneous svdbip")
Usage
svdbips(x, K, H, r)
Arguments
x |
a |
K |
is a row vector which contains the numbers pk, k=1,...,kx, of the partition of x with kx row blocks : |
H |
is a row vector which contains the numbers qh, h=1,...,ky, of the partition of x with ky column blocks : sum(qh)=q |
r |
The number of wanted successive solutions |
Details
One set of r solutions is calculated by maximizing \sum_i \sum_k \sum_h
(u_k[,i]'*x_{kh}*v_h[,i])^2
, with kx+ky orthonormality constraints (for
each uk and each vh). For each fixed r value, the solution is totally
new (does'nt consist to complete a previous calculus of one set of r-1
solutions). rmax=min([min(K),min(H)])
. When r=1, it is svdbip (thus
it is svdcp when r=1 and kx=1).
Convergence of algorithm may be not global. So the below proposed
initialisation of the algorithm may be not very suitable for some data
sets. Several different random initialisations with normed vectors
might be considered and the best result then choosen....
Value
A list
with following components:
u |
a |
v |
a |
s |
a |
Author(s)
Lafosse, R.
References
Lafosse R. & Ten Berge J. A simultaneous CONCOR method for the analysis of two partitioned matrices. submitted.
Examples
x <- matrix(runif(200),10,20)
s1 <- svdbip(x,c(3,4,3),c(5,5,10),2);sum(sum(sum(s1$s2)))
ss <- svdbips(x,c(3,4,3),c(5,5,10),2);sum(sum(sum(ss$s2)))
SVD for a Column Partitioned matrix x
Description
SVD for a Column Partitioned matrix x. r global successive solutions
Usage
svdcp(x, H, r)
Arguments
x |
a |
H |
is a row vector which contains the numbers qh, h=1,...,ky, of the partition of x with ky column blocks : sum(qh)=q |
r |
The number of wanted successive solutions |
Details
The first solution calculates 1+kx normed vectors: the vector u[,1]
of
R^p
associated to the kx vectors vi[,1]
's of R^{q_i}
. by maximizing
\sum_i (u[,1]'*x_i*v_i[,1])^2
, with 1+kx norm constraints. A
value (u[,1]'*x_i*v_i[,1])^2
measures the relative link between
R^p
and R^{q_i}
associated to xi. It corresponds to a partial squared
singular value notion, since \sum_i (u[,1]'*x_i*v_i[,1])^2=s^2
,
where s is the usual first singular value of x.
The second solution is obtained from the same criterion, but after
replacing each xi by xi-xi*vi[,1]*vi[,1]^prime
. And so on for the
successive solutions 1,2,...,r . The biggest number of solutions may
be r=inf(p,qi), when the xi's are supposed with full rank; then
rmax=min([min(H),p])
.
Value
A list
with following components:
u |
a |
v |
a |
s |
a |
Author(s)
Lafosse, R.
References
Lafosse R. & Hanafi M.(1997) Concordance d'un tableau avec K tableaux: Definition de K+1 uples synthetiques. Revue de Statistique Appliquee vol.45,n.4.
Examples
x <- matrix(runif(200),10,20)
s <- svdcp(x,c(5,5,10),1)
ss <- svd(x);ss$d[1]^2
sum(s$s2)