<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using weight variable in Proc Distance in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Using-weight-variable-in-Proc-Distance/m-p/196764#M10534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I 'm not sure what you want us to say.&amp;nbsp; You want to weight the variables. The WEIGHTS= option in the VARS statement enables you to do it. From a SAS sytax point of view, your problem is solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are asking what relative weights you should use, then that depends on what you are trying to accomplish, and we don't have that information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you trying to compute the distance in the PCA system? If so, you can use the distance between the PCA scores, which are the coordinates in the basis for the PCA vectors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One possible interpretation of your request is "how do I&amp;nbsp; assign relative importance to the PCA vectors?" You can use the "proportion of variance explained".&amp;nbsp; Geometrically, I think that would undo the standardization and result in a coordinate system that is orthogonal but not orthonormal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Mar 2015 16:24:45 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2015-03-11T16:24:45Z</dc:date>
    <item>
      <title>Using weight variable in Proc Distance</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-weight-variable-in-Proc-Distance/m-p/196761#M10531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Background:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to compute Mahalanobis distance for a dataset with about 200 observations and 17 variables. The goal is to identify 10 closest observations for each row. Variables have very different scales, and there are no missing values. &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Variables are of un-equal 'importance'. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;As recommended in:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://support.sas.com/kb/30/662.html" style="font-size: 10pt; line-height: 1.5em;" title="http://support.sas.com/kb/30/662.html"&gt;30662 - Mahalanobis distance: from each observation to the mean, from each observation to a specific observation, between all possible pairs&lt;/A&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;, I used Proc PRINCOMP with std option and used prin1:prin17 for computing Euclidean distance. &lt;/SPAN&gt;As expected first three components accounted for most of the variance. In particular, the first two were correlated highly with the key variables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that the &lt;STRONG&gt;weight&lt;/STRONG&gt; option in the &lt;STRONG&gt;var&lt;/STRONG&gt; statement could be used to assign greater importance to the first three components. However, there does not seem to be a rational basis for picking reasonable weight values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any feedback, suggestions will be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Mar 2015 22:04:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-weight-variable-in-Proc-Distance/m-p/196761#M10531</guid>
      <dc:creator>rtaylor</dc:creator>
      <dc:date>2015-03-07T22:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using weight variable in Proc Distance</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-weight-variable-in-Proc-Distance/m-p/196762#M10532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IML function ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MAHALANOBIS Function&lt;/P&gt;&lt;P&gt;MAHALANOBIS(x, &amp;lt; , center &amp;gt; &amp;lt; , cov &amp;gt; );&lt;/P&gt;&lt;P&gt;The MAHALANOBIS function is part of the IMLMLIB library. The MAHALANOBIS function returns the&lt;/P&gt;&lt;P&gt;Mahalanobis distance between center and the rows of x, measured according to the Mahalanobis metric. The&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 07:37:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-weight-variable-in-Proc-Distance/m-p/196762#M10532</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-03-09T07:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using weight variable in Proc Distance</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-weight-variable-in-Proc-Distance/m-p/196763#M10533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Xia,&lt;/P&gt;&lt;P&gt;I have already computed Mahalanobis distance&amp;nbsp; - as the Euclidean distance with principal components. My questions pertains to the use of the '&lt;EM&gt;&lt;STRONG&gt;weight&lt;/STRONG&gt;&lt;/EM&gt;' option in '&lt;EM&gt;&lt;STRONG&gt;var&lt;/STRONG&gt;&lt;/EM&gt;' statement in &lt;STRONG&gt;PROC DISTANCE&lt;/STRONG&gt;. Particularly, I am trying to find out if it is possible and reasonable to 'weight' the first principal component more heavily. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2015 01:45:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-weight-variable-in-Proc-Distance/m-p/196763#M10533</guid>
      <dc:creator>rtaylor</dc:creator>
      <dc:date>2015-03-11T01:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using weight variable in Proc Distance</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-weight-variable-in-Proc-Distance/m-p/196764#M10534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I 'm not sure what you want us to say.&amp;nbsp; You want to weight the variables. The WEIGHTS= option in the VARS statement enables you to do it. From a SAS sytax point of view, your problem is solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are asking what relative weights you should use, then that depends on what you are trying to accomplish, and we don't have that information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you trying to compute the distance in the PCA system? If so, you can use the distance between the PCA scores, which are the coordinates in the basis for the PCA vectors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One possible interpretation of your request is "how do I&amp;nbsp; assign relative importance to the PCA vectors?" You can use the "proportion of variance explained".&amp;nbsp; Geometrically, I think that would undo the standardization and result in a coordinate system that is orthogonal but not orthonormal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2015 16:24:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-weight-variable-in-Proc-Distance/m-p/196764#M10534</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-03-11T16:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using weight variable in Proc Distance</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-weight-variable-in-Proc-Distance/m-p/196765#M10535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Dr. Wicklin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I indeed meant the last interpretation.&amp;nbsp; The goal is to find observations that are similar to each other, considering redundancy among variables as well importance from a substantive perspective. From a data-reduction view point, distance using first 4-5 scores could be used, which would be equivalent to assigning zero weight to the rest of the variable. Proportion of variance seems more justifiable. In the end, the two may result in fairly similar values given that the first five factors explain over 80% of variance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not seen any examples of weighting. Are there concrete examples that you could point me to. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2015 23:21:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-weight-variable-in-Proc-Distance/m-p/196765#M10535</guid>
      <dc:creator>rtaylor</dc:creator>
      <dc:date>2015-03-11T23:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using weight variable in Proc Distance</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-weight-variable-in-Proc-Distance/m-p/196766#M10536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you can just use the Euclidean distance between coordinates of the first 4-5 PCA scores.&amp;nbsp; A simple way to do this is to specify N=4 or N=5 in the PROC PRINCOMP statement. No need to use the WEIGHTS= option at all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 14:07:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-weight-variable-in-Proc-Distance/m-p/196766#M10536</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-03-18T14:07:10Z</dc:date>
    </item>
  </channel>
</rss>

