<?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: Function to Scale Variables Based on a User-Defined Range in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Function-to-Scale-Variables-Based-on-a-User-Defined-Range/m-p/143589#M28712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try Proc stdize and/or call stdize.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc if your standardizing down a column and call stdize if its across columns, i.e. a row. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jun 2014 00:38:52 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2014-06-17T00:38:52Z</dc:date>
    <item>
      <title>Function to Scale Variables Based on a User-Defined Range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Function-to-Scale-Variables-Based-on-a-User-Defined-Range/m-p/143588#M28711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suppose I have the dataset below. Is there a function or technique that would allow me to scale each variable from 1 to 100 based upon user-defined (not actual) minimum and maximum values for each variable, respectively? For instance, I'd like a variable called Ratio_1_std that would score ratio_1 variables based upon how far they are into the range from 0 to 50. And I'd like a variable called Ratio_2_std that would score ratio_2 from 0 to 100 based upon a different range, perhaps 5 to 55. Values below the minimum and maximum provided would get scores of 1 and 100, respectively. I can simply code the desired results manually for each variable, but I'm looking for a potential function or technique that will do this based upon parameters I provide for each variable to minimize coding and to more easily apply this technique to many variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;STRONG style="color: navy; font-size: 9pt; font-family: 'Courier New'; background-position: initial;"&gt;DATA&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; WORK.TEMP;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;INPUT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; ID RATIO_1 RATIO_2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;DATALINES&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black; background: #ffffc0;"&gt;1 25 50&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black; background: #ffffc0;"&gt;2 5&amp;nbsp; 10&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;STRONG style="color: navy; font-size: 9pt; font-family: 'Courier New'; background-position: initial;"&gt;RUN&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black; background-position: initial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 22:55:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Function-to-Scale-Variables-Based-on-a-User-Defined-Range/m-p/143588#M28711</guid>
      <dc:creator>emikea</dc:creator>
      <dc:date>2014-06-16T22:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Function to Scale Variables Based on a User-Defined Range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Function-to-Scale-Variables-Based-on-a-User-Defined-Range/m-p/143589#M28712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try Proc stdize and/or call stdize.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc if your standardizing down a column and call stdize if its across columns, i.e. a row. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 00:38:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Function-to-Scale-Variables-Based-on-a-User-Defined-Range/m-p/143589#M28712</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-06-17T00:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Function to Scale Variables Based on a User-Defined Range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Function-to-Scale-Variables-Based-on-a-User-Defined-Range/m-p/143590#M28713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still not sure if I have understand what you are after, it would be great if you can lay out some sample outcome based on your input data. But I have a feeling that you may want to check out PROC FCMP or DS2 custom method or simply PROC FORMAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 02:20:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Function-to-Scale-Variables-Based-on-a-User-Defined-Range/m-p/143590#M28713</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-06-17T02:20:23Z</dc:date>
    </item>
  </channel>
</rss>

