From: Spencer Graves <spencer.graves_at_pdf.com>

Date: Wed 07 Jul 2004 - 14:00:10 EST

R-help@stat.math.ethz.ch mailing list

https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jul 07 14:08:04 2004

Date: Wed 07 Jul 2004 - 14:00:10 EST

hope this helps. spencer graves

> Hello,

*> I have a question that is not directly related to R ... but I try to
**> do it in R ;-) :
**>
**> I would like to generate a matrix Q satisfying (for a given Z, X and
**> W) the two following conditions:
**>
**> t(Q)%*%Q=Z (1)
**> XQ=W (2)
**>
**> where:
**> Q is m rows and r columns
**> X is p rows and m columns
**> D is p rows and r columns
**> C is r rows and r columns
**> with m>p,r
**>
**>
**> e.g:
**> m=6,
**> p=2
**> r=3
**>
**> Z=matrix(c(1,.2,.5,.2,1,.45,.5,.45,1),3,3)
**> X=matrix(c(.1,.3,.5,.6,.2,.1,.8,1,.4,.2,.2,.9),2,6)
**> W=matrix(c(0,.8,.4,.6,.2,0),2,3)
**>
**> #Create a matrix satisfying (1) is easy:
**>
**> A=matrix(runif(18),6,3)
**> Q1=svd(A)$u%*%chol(Z)
**>
**>
**> #For the second condition (2), a solution is given by
**>
**> Q2=A%*%ginv(X%*%A)%*%W
**>
**>
**>
**>
**>
**> I do not know how to create a matrix Q that satisfies the two
**> conditions. I have try to construct an iterative procedure without
**> success (no convergence):
**>
**> eps=10
**> i=0
**> while(eps>.5)
**> {
**> Q1=svd(Q2)$u%*%chol(Z)
**> Q2=Q1%*%ginv(X%*%Q1)%*%W
**> eps=sum(abs(Q1-Q2))
**> cat(i,":",eps,"\n")
**> i=i+1
**> }
**>
**> Perhaps someone could have any idea to solve the problem, or a
**> reference on this kind of question or the email of another list where
**> I should ask this question.
**>
**> Thanks in advance,
**>
**> Sincerely.
**>
**> Stéphane DRAY
**> --------------------------------------------------------------------------------------------------
**>
**> Département des Sciences Biologiques
**> Université de Montréal, C.P. 6128, succursale centre-ville
**> Montréal, Québec H3C 3J7, Canada
**>
**> Tel : 514 343 6111 poste 1233
**> E-mail : stephane.dray@umontreal.ca
**> --------------------------------------------------------------------------------------------------
**>
**> Web
**> http://www.steph280.freesurf.fr/
**>
**> ______________________________________________
**> R-help@stat.math.ethz.ch mailing list
**> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
**> PLEASE do read the posting guide!
**> http://www.R-project.org/posting-guide.html
*

R-help@stat.math.ethz.ch mailing list

https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jul 07 14:08:04 2004

*
This archive was generated by hypermail 2.1.8
: Fri 18 Mar 2005 - 02:34:46 EST
*