----- Forwarded message from [email protected] ----- Date: Thu, 12 Jun 2014 06:45:46 -0700 From: [email protected] Reply-To: [email protected] Subject: Re: Comparing svd() and prcomp() output from R To: [email protected]
----- Forwarded message from Stefan Schlager <[email protected]> ----- Date: Sun, 8 Jun 2014 08:29:16 -0400 From: Stefan Schlager <[email protected]> Reply-To: Stefan Schlager <[email protected]> Subject: Re: Fwd: Re: Comparing svd() and prcomp() output from R To: [email protected] Hi Murat, to get the same results, you need to: a) center your data (as dennis slice pointed out) => gives identical PCs b) divide the squared singular values by (sample size -1) => gives identical eigenvalues Best Stefan On 07/06/14 06:16, morphmet wrote: > > > > -------- Original Message -------- > Subject: Re: Comparing svd() and prcomp() output from R > Date: Fri, 6 Jun 2014 16:26:20 -0400 > From: Dennis E. Slice <[email protected]> > To: [email protected] > > I take it you are comparing svd(x) and prcomp(x) where x is your data > matrix? prcomp() subtracts the mean. -ds > > On 6/6/14, 11:09 AM, [email protected] wrote: >> >> ----- Forwarded message from "Maga, Murat" >> <[email protected]> ----- >> >> Date: Thu, 15 May 2014 18:54:15 -0400 >> From: "Maga, Murat" <[email protected]> >> Reply-To: "Maga, Murat" <[email protected]> >> Subject: Comparing svd() and prcomp() output from R >> To: "'[email protected]'" <[email protected]> >> >> Hi folks, >> >> This is really a R question, but perhaps someone can help me. >> >> When I run svd() and prcomp() functions on my procrustes aligned >> coordinates, I end up with an interesting situation, where the 1st >> component from the prcomp() is identical to the 2nd component from >> svd() and it keeps going with this shift. >> >> The first component from SVD has a large variance attached to it. If >> you remove that and recalculate the percentages, they are identical >> to the variances explained by prcomp. >> >> Any ideas what's happening? >> >> Thanks, >> M >> >> CONFIDENTIALITY NOTICE: This e-mail message, including any >> attachments, is for the sole use of the intended recipient(s) and may >> contain confidential and privileged information protected by law. Any >> unauthorized review, use, disclosure or distribution is prohibited. >> If you are not the intended recipient, please contact the sender by >> reply e-mail and destroy all copies of the original message. >> >> ----- End forwarded message ----- >> >> > > > > ----- End forwarded message ----- ----- End forwarded message -----
signature.asc
Description: PGP signature
