<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Source Code: Preisendorfer&#8217;s Rule N</title>
	<atom:link href="http://climateaudit.org/2005/08/04/source-code-preisendorfers-rule-n/feed/" rel="self" type="application/rss+xml" />
	<link>http://climateaudit.org/2005/08/04/source-code-preisendorfers-rule-n/</link>
	<description>by Steve McIntyre</description>
	<lastBuildDate>Mon, 20 May 2013 05:49:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Ross McKitrick</title>
		<link>http://climateaudit.org/2005/08/04/source-code-preisendorfers-rule-n/#comment-35319</link>
		<dc:creator><![CDATA[Ross McKitrick]]></dc:creator>
		<pubDate>Thu, 22 Sep 2005 15:03:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.climateaudit.org/?p=291#comment-35319</guid>
		<description><![CDATA[Re #3: Here&#039;s another go at understanding eigenvalues/vectors. You have a square matrix A with k columns and k rows. And you have a vector c with k rows (and 1 column). The product Ac yields another vector d with k rows. If you graph a vector it&#039;s just a point on a diagram with k axes, and there&#039;s a line between it and the origin so we can think of a vector having a direction and a length. When you multiply A times c you&#039;re creating a new vector d. It&#039;s also just a point in k-space, with a length and a direction.
Now suppose you multiply a vector p by A and the resulting vector q (=Ap) has the same direction as the old vector. If you picture this in 2-d, what that means is q is a scalar multiple of p. It&#039;s just stretched or shrunk along the same direction. So you didn&#039;t even need to use the matrix A, just the scalar multiple, which we&#039;ll call z. So q = zp, where z is just a number. Then we have 2 equations, q=Ap and q=zp, and that implies Ap=zp. With some algebraic rearranging that gives us (A-Iz)p=0 where I is an identity matrix with k rows/columns, all 0&#039;s except 1&#039;s down the diagonal.

Now suppose you try out every possible vector in k-space and note down all the pairs of vectors p and scalars z for which (A-Iz)p=0. There will be at most k of them, and they can be solved using a standard algorithm. These are the &quot;eigenpairs&quot;-- eigenvalues (z&#039;s) and eigenvectors (p&#039;s). My German secretary told me that &quot;eigen&quot; means &quot;essence&quot; or &quot;of itself&quot;. The eigenvectors are the directions in which a matrix A transforms a vector &quot;eigenly&quot;--it doesn&#039;t change the vector&#039;s direction, it only dilates it (by the scalar amount z). In other words it&#039;s the simplest transformation associated with the matrix A.

Principal component analysis starts out by describing a different problem. You have a data matrix M and you want to approximate it with a vector w. If you set it up as a sum of squares minimizing problem you end up with an algebraic expression that involves computing the eigenvectors/values for the matrix M&#039;M. If the columns of M are centered to a zero mean this is the covariance matrix of M.]]></description>
		<content:encoded><![CDATA[<p>Re #3: Here&#8217;s another go at understanding eigenvalues/vectors. You have a square matrix A with k columns and k rows. And you have a vector c with k rows (and 1 column). The product Ac yields another vector d with k rows. If you graph a vector it&#8217;s just a point on a diagram with k axes, and there&#8217;s a line between it and the origin so we can think of a vector having a direction and a length. When you multiply A times c you&#8217;re creating a new vector d. It&#8217;s also just a point in k-space, with a length and a direction.<br />
Now suppose you multiply a vector p by A and the resulting vector q (=Ap) has the same direction as the old vector. If you picture this in 2-d, what that means is q is a scalar multiple of p. It&#8217;s just stretched or shrunk along the same direction. So you didn&#8217;t even need to use the matrix A, just the scalar multiple, which we&#8217;ll call z. So q = zp, where z is just a number. Then we have 2 equations, q=Ap and q=zp, and that implies Ap=zp. With some algebraic rearranging that gives us (A-Iz)p=0 where I is an identity matrix with k rows/columns, all 0&#8242;s except 1&#8242;s down the diagonal.</p>
<p>Now suppose you try out every possible vector in k-space and note down all the pairs of vectors p and scalars z for which (A-Iz)p=0. There will be at most k of them, and they can be solved using a standard algorithm. These are the &#8220;eigenpairs&#8221;&#8211; eigenvalues (z&#8217;s) and eigenvectors (p&#8217;s). My German secretary told me that &#8220;eigen&#8221; means &#8220;essence&#8221; or &#8220;of itself&#8221;. The eigenvectors are the directions in which a matrix A transforms a vector &#8220;eigenly&#8221;&#8211;it doesn&#8217;t change the vector&#8217;s direction, it only dilates it (by the scalar amount z). In other words it&#8217;s the simplest transformation associated with the matrix A.</p>
<p>Principal component analysis starts out by describing a different problem. You have a data matrix M and you want to approximate it with a vector w. If you set it up as a sum of squares minimizing problem you end up with an algebraic expression that involves computing the eigenvectors/values for the matrix M&#8217;M. If the columns of M are centered to a zero mean this is the covariance matrix of M.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Lane</title>
		<link>http://climateaudit.org/2005/08/04/source-code-preisendorfers-rule-n/#comment-35318</link>
		<dc:creator><![CDATA[James Lane]]></dc:creator>
		<pubDate>Thu, 22 Sep 2005 13:25:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.climateaudit.org/?p=291#comment-35318</guid>
		<description><![CDATA[Interestingly, although I did four years of stats at university, I don&#039;t recall that we did any PCA (or factor analysis, for that matter).  I came across it in a commercial situation a few years later - I bought a couple of texts, and learned it from scratch.f]]></description>
		<content:encoded><![CDATA[<p>Interestingly, although I did four years of stats at university, I don&#8217;t recall that we did any PCA (or factor analysis, for that matter).  I came across it in a commercial situation a few years later &#8211; I bought a couple of texts, and learned it from scratch.f</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Lane</title>
		<link>http://climateaudit.org/2005/08/04/source-code-preisendorfers-rule-n/#comment-35317</link>
		<dc:creator><![CDATA[James Lane]]></dc:creator>
		<pubDate>Thu, 22 Sep 2005 13:10:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.climateaudit.org/?p=291#comment-35317</guid>
		<description><![CDATA[TCO, there&#039;s still one thread on this site you haven&#039;t made a comment on, but I&#039;m not going to tell you, you&#039;ll have to find it for yourself!]]></description>
		<content:encoded><![CDATA[<p>TCO, there&#8217;s still one thread on this site you haven&#8217;t made a comment on, but I&#8217;m not going to tell you, you&#8217;ll have to find it for yourself!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TCO</title>
		<link>http://climateaudit.org/2005/08/04/source-code-preisendorfers-rule-n/#comment-35316</link>
		<dc:creator><![CDATA[TCO]]></dc:creator>
		<pubDate>Thu, 22 Sep 2005 12:29:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.climateaudit.org/?p=291#comment-35316</guid>
		<description><![CDATA[Red flag...bull...horns lowered...Steve-gonna-get-a-gorin&#039;  ;)]]></description>
		<content:encoded><![CDATA[<p>Red flag&#8230;bull&#8230;horns lowered&#8230;Steve-gonna-get-a-gorin&#8217;  <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve McIntyre</title>
		<link>http://climateaudit.org/2005/08/04/source-code-preisendorfers-rule-n/#comment-35315</link>
		<dc:creator><![CDATA[Steve McIntyre]]></dc:creator>
		<pubDate>Thu, 22 Sep 2005 11:43:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.climateaudit.org/?p=291#comment-35315</guid>
		<description><![CDATA[Any rectangular matrix H of dimension (n,m), usually n&gt;m, can be represented as follows:
H = U* D * V, where U is orthogonal (n,n), D is diagonal with decreasing values from left top to bottom right and V is orthogonal (m,m). The matrix terminology is that D are the eigenvalues, V the eigenvectors. &quot;Eigen&quot; means singular and so you sometimes see &quot;eigenvalues&quot; called singular values; the operation is usually called singular value decomposition (svd).

In principal components, you do a svd on the covariance matrix or correlation matrix of H. If H is centered on its columns (as required by Preisendorfer to be an analysis of &lt;em&gt;variance&lt;/em&gt;), then svd on centered H and svd on the covariance matrix will yield equivalent results. Svd on a centered and scaled version of H will yield equivalent results to svd on a correlation matrix.

If the covariance matrix is Q, then svd on it yields:
Q=U*D* V (not necessarily the same U and V as for H unless H is centered). V is symmetric  t(V)=V and t(V)=V^-1. If you project the original data matrix H on the eigenvector matrix V, you get the principal components F:
F= H*V,

Thus, the original data matrix is the product of the principal components and the eigenvectors, H=F*V, since
since F*V=F*t(V)= H*V*t(V)=H.

In this decomposition, the eigenvalues are related to the standard deviations of the left matrix series. THey are reported a little difffferently in princomp and prcomp - with one dividing by n and one dividing by (n-1). It ttook me a whole to figure this out.

The principal component programs in R (and S) have slightly different terminologies. The left matrix is called &quot;scores&quot; in princomp and &quot;x&quot; in prcomp; the right matrix is called &quot;loadings&quot; in princomp and &quot;rotation&quot; in prcomp and the weightings are called &quot;sdev&quot;.

I first used princomp, but Im using prcomp now, since it ties directly to svd decompositions, while princomp needs to make a slight weight adjustment to recover corresponding eigenvalues.]]></description>
		<content:encoded><![CDATA[<p>Any rectangular matrix H of dimension (n,m), usually n&gt;m, can be represented as follows:<br />
H = U* D * V, where U is orthogonal (n,n), D is diagonal with decreasing values from left top to bottom right and V is orthogonal (m,m). The matrix terminology is that D are the eigenvalues, V the eigenvectors. &quot;Eigen&quot; means singular and so you sometimes see &quot;eigenvalues&quot; called singular values; the operation is usually called singular value decomposition (svd).</p>
<p>In principal components, you do a svd on the covariance matrix or correlation matrix of H. If H is centered on its columns (as required by Preisendorfer to be an analysis of <em>variance</em>), then svd on centered H and svd on the covariance matrix will yield equivalent results. Svd on a centered and scaled version of H will yield equivalent results to svd on a correlation matrix.</p>
<p>If the covariance matrix is Q, then svd on it yields:<br />
Q=U*D* V (not necessarily the same U and V as for H unless H is centered). V is symmetric  t(V)=V and t(V)=V^-1. If you project the original data matrix H on the eigenvector matrix V, you get the principal components F:<br />
F= H*V,</p>
<p>Thus, the original data matrix is the product of the principal components and the eigenvectors, H=F*V, since<br />
since F*V=F*t(V)= H*V*t(V)=H.</p>
<p>In this decomposition, the eigenvalues are related to the standard deviations of the left matrix series. THey are reported a little difffferently in princomp and prcomp &#8211; with one dividing by n and one dividing by (n-1). It ttook me a whole to figure this out.</p>
<p>The principal component programs in R (and S) have slightly different terminologies. The left matrix is called &quot;scores&quot; in princomp and &quot;x&quot; in prcomp; the right matrix is called &quot;loadings&quot; in princomp and &quot;rotation&quot; in prcomp and the weightings are called &quot;sdev&quot;.</p>
<p>I first used princomp, but Im using prcomp now, since it ties directly to svd decompositions, while princomp needs to make a slight weight adjustment to recover corresponding eigenvalues.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TCO</title>
		<link>http://climateaudit.org/2005/08/04/source-code-preisendorfers-rule-n/#comment-35314</link>
		<dc:creator><![CDATA[TCO]]></dc:creator>
		<pubDate>Thu, 22 Sep 2005 11:22:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.climateaudit.org/?p=291#comment-35314</guid>
		<description><![CDATA[dude, that&#039;s all cool and all.  But did you listen to my math background?  I don&#039;t know what the word &quot;transform&quot; means mathematically.b]]></description>
		<content:encoded><![CDATA[<p>dude, that&#8217;s all cool and all.  But did you listen to my math background?  I don&#8217;t know what the word &#8220;transform&#8221; means mathematically.b</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fFreddy</title>
		<link>http://climateaudit.org/2005/08/04/source-code-preisendorfers-rule-n/#comment-35313</link>
		<dc:creator><![CDATA[fFreddy]]></dc:creator>
		<pubDate>Thu, 22 Sep 2005 07:32:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.climateaudit.org/?p=291#comment-35313</guid>
		<description><![CDATA[Any matrix can be used to transform space. The eigenvectors of the matrix represent those vectors in the space whose direction is not affected by the transformation; the eigenvalues represent the amount by which the eigenvectors are stretched or compressed.
The fun bit is thinking through what the space is representing in any particular case.
Don&#039;t be scared of eigens, they&#039;re really pretty.]]></description>
		<content:encoded><![CDATA[<p>Any matrix can be used to transform space. The eigenvectors of the matrix represent those vectors in the space whose direction is not affected by the transformation; the eigenvalues represent the amount by which the eigenvectors are stretched or compressed.<br />
The fun bit is thinking through what the space is representing in any particular case.<br />
Don&#8217;t be scared of eigens, they&#8217;re really pretty.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TCO</title>
		<link>http://climateaudit.org/2005/08/04/source-code-preisendorfers-rule-n/#comment-35312</link>
		<dc:creator><![CDATA[TCO]]></dc:creator>
		<pubDate>Thu, 22 Sep 2005 04:40:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.climateaudit.org/?p=291#comment-35312</guid>
		<description><![CDATA[Haved had that much more than that.  some snippets for other courses.  Just makes me recognize terms and at times concepts.  But not really know much.]]></description>
		<content:encoded><![CDATA[<p>Haved had that much more than that.  some snippets for other courses.  Just makes me recognize terms and at times concepts.  But not really know much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TCO</title>
		<link>http://climateaudit.org/2005/08/04/source-code-preisendorfers-rule-n/#comment-35311</link>
		<dc:creator><![CDATA[TCO]]></dc:creator>
		<pubDate>Thu, 22 Sep 2005 04:39:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.climateaudit.org/?p=291#comment-35311</guid>
		<description><![CDATA[I wish I knew more math.  I aced differential calc, integral calc, got a B in multivariable calc(not as quickly as intuitive as the others), and then A in diffeqs.]]></description>
		<content:encoded><![CDATA[<p>I wish I knew more math.  I aced differential calc, integral calc, got a B in multivariable calc(not as quickly as intuitive as the others), and then A in diffeqs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TCO</title>
		<link>http://climateaudit.org/2005/08/04/source-code-preisendorfers-rule-n/#comment-35310</link>
		<dc:creator><![CDATA[TCO]]></dc:creator>
		<pubDate>Thu, 22 Sep 2005 04:37:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.climateaudit.org/?p=291#comment-35310</guid>
		<description><![CDATA[I don&#039;t really know &quot;mattreses&quot;.  My mind tuned out when they started talking about determinants.  And I&#039;ve never had a full up class on it.  Just the snippets that you get in other stuff.]]></description>
		<content:encoded><![CDATA[<p>I don&#8217;t really know &#8220;mattreses&#8221;.  My mind tuned out when they started talking about determinants.  And I&#8217;ve never had a full up class on it.  Just the snippets that you get in other stuff.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
