<?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: the product of two datasets in sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/the-product-of-two-datasets-in-sas/m-p/326156#M72594</link>
    <description>&lt;P&gt;PROC SCORE will handle the categorical variables as long as the data used for scoring is identical, in format, to the input data.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jan 2017 01:42:49 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-01-20T01:42:49Z</dc:date>
    <item>
      <title>the product of two datasets in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/the-product-of-two-datasets-in-sas/m-p/326142#M72589</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here I have a question about how to perform mathematic computation across datasets.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Say I have a dataset &lt;STRONG&gt;coefficient&lt;/STRONG&gt; like this:&lt;/P&gt;&lt;P&gt;variable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; coef&lt;/P&gt;&lt;P&gt;age&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;&lt;P&gt;gender&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;hight&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and another dataset &lt;STRONG&gt;student&lt;/STRONG&gt; which have variables age, gender, hight, and others (all numerical):&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;age&amp;nbsp;&amp;nbsp;&amp;nbsp; gender&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hight&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grade&amp;nbsp;&amp;nbsp;weight&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1015&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;146&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 37&lt;/P&gt;&lt;P&gt;.........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to compute a score of each row in dataset "&lt;STRONG&gt;student&lt;/STRONG&gt; " by using the value of variables in &lt;STRONG&gt;student&lt;/STRONG&gt;&amp;nbsp; time the corresponding coef in data &lt;STRONG&gt;coefficient&lt;/STRONG&gt;&amp;nbsp;and then sum up, i.e. :&amp;nbsp; age*15+gender*3+hight*6.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me realize this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best wishes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 22:33:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/the-product-of-two-datasets-in-sas/m-p/326142#M72589</guid>
      <dc:creator>Xiaoningdemao</dc:creator>
      <dc:date>2017-01-19T22:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: the product of two datasets in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/the-product-of-two-datasets-in-sas/m-p/326143#M72590</link>
      <description>&lt;P&gt;Where do the coefficients come from?&lt;/P&gt;
&lt;P&gt;Can you use PROC SCORE to implement this somehow?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 22:38:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/the-product-of-two-datasets-in-sas/m-p/326143#M72590</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-01-19T22:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: the product of two datasets in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/the-product-of-two-datasets-in-sas/m-p/326147#M72592</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, it is the coefficents from SAS output.&lt;/P&gt;&lt;P&gt;I tried proc score as you suggestted, but i have categorical variable, say rank, which has 5 levels, when i score it, the coefficents become rank1 rank2 rank3 rank4 rank5...&lt;/P&gt;&lt;P&gt;How to resolve this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much!!!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 23:31:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/the-product-of-two-datasets-in-sas/m-p/326147#M72592</guid>
      <dc:creator>Xiaoningdemao</dc:creator>
      <dc:date>2017-01-19T23:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: the product of two datasets in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/the-product-of-two-datasets-in-sas/m-p/326156#M72594</link>
      <description>&lt;P&gt;PROC SCORE will handle the categorical variables as long as the data used for scoring is identical, in format, to the input data.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2017 01:42:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/the-product-of-two-datasets-in-sas/m-p/326156#M72594</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-01-20T01:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: the product of two datasets in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/the-product-of-two-datasets-in-sas/m-p/326165#M72596</link>
      <description>&lt;P&gt;&lt;A href="http://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html" target="_blank"&gt;http://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2017 02:15:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/the-product-of-two-datasets-in-sas/m-p/326165#M72596</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-01-20T02:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: the product of two datasets in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/the-product-of-two-datasets-in-sas/m-p/326381#M72670</link>
      <description>&lt;P&gt;Dear Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code I'm using,&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;logistic&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=modeldata &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;descending&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;outest&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=modelname ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;model&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; outcome= &amp;amp;continue_vars &amp;amp;class_vars; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;output&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=modeldata &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;PREDICTED&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=prob;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;score&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=dataname &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;score&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=modelname &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=dataname &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;type&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=parms;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;var&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &amp;amp;continue_vars &amp;amp;class_vars;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;amp;class_vars&lt;/FONT&gt; contains categorical variables, in the PROC SCORE, it just keep giveing me error messages, saying those variables (&lt;FONT face="Courier New" size="2"&gt;&amp;amp;class_vars&lt;/FONT&gt;)&amp;nbsp;not found:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2017 18:24:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/the-product-of-two-datasets-in-sas/m-p/326381#M72670</guid>
      <dc:creator>Xiaoningdemao</dc:creator>
      <dc:date>2017-01-20T18:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: the product of two datasets in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/the-product-of-two-datasets-in-sas/m-p/326485#M72708</link>
      <description>&lt;P&gt;You need to score a logistic model using proc logistic not proc score but since this requires a stored model, not the parameter data &amp;nbsp;set that won't work. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2017 05:09:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/the-product-of-two-datasets-in-sas/m-p/326485#M72708</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-01-21T05:09:30Z</dc:date>
    </item>
  </channel>
</rss>

