<?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: How to attribute a value of a given variable of a case to its matched control in All Things Community</title>
    <link>https://communities.sas.com/t5/All-Things-Community/How-to-attribute-a-value-of-a-given-variable-of-a-case-to-its/m-p/403638#M2738</link>
    <description>&lt;P&gt;Hi Ballardw&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for replying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data&lt;STRONG&gt; are already matched&lt;/STRONG&gt; using the match_ID variable that identifies matched case and controls. Each case can have more than one control. Varx (that takes value 0 or 1) is missing for all the controls in the dataset but for each matched control the value of Varx is the same as for the case (i.e., if Varx =0 for the case, it should also be 0 for the matched controls).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this clarify.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks again&lt;/P&gt;</description>
    <pubDate>Thu, 12 Oct 2017 17:46:58 GMT</pubDate>
    <dc:creator>arzon</dc:creator>
    <dc:date>2017-10-12T17:46:58Z</dc:date>
    <item>
      <title>How to attribute a value of a given variable of a case to its matched control</title>
      <link>https://communities.sas.com/t5/All-Things-Community/How-to-attribute-a-value-of-a-given-variable-of-a-case-to-its/m-p/403623#M2736</link>
      <description>&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Hi dear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will be grateful if someone can help me with the following query:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have cases matched to controls and I need to attribute a value of a case for a given variable to the corresponding matched control. as detailed in the tables below, I need to attribute the value "1" of the "Varx' of the case to the control (case=0) so that the value of the control for varx become 1 instead of missing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Input table;&lt;/P&gt;&lt;P&gt;ID &amp;nbsp; Macth_ID &amp;nbsp;case &amp;nbsp; Varx&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; 1a &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; &amp;nbsp; 1a &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;&amp;nbsp;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output expected:&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID &amp;nbsp; Macth_ID &amp;nbsp;case &amp;nbsp; Varx&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; 1a &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; &amp;nbsp; 1a &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thanks in advance for your support.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 17:12:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/All-Things-Community/How-to-attribute-a-value-of-a-given-variable-of-a-case-to-its/m-p/403623#M2736</guid>
      <dc:creator>arzon</dc:creator>
      <dc:date>2017-10-12T17:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to attribute a value of a given variable of a case to its matched control</title>
      <link>https://communities.sas.com/t5/All-Things-Community/How-to-attribute-a-value-of-a-given-variable-of-a-case-to-its/m-p/403627#M2737</link>
      <description>&lt;P&gt;Are you implying that your are&amp;nbsp;matching on the Match_ID variable? If so, do you ever have more than two records with the same Match_id? Do you only have one non-missing value for Varx per Match_id?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 17:28:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/All-Things-Community/How-to-attribute-a-value-of-a-given-variable-of-a-case-to-its/m-p/403627#M2737</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-10-12T17:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to attribute a value of a given variable of a case to its matched control</title>
      <link>https://communities.sas.com/t5/All-Things-Community/How-to-attribute-a-value-of-a-given-variable-of-a-case-to-its/m-p/403638#M2738</link>
      <description>&lt;P&gt;Hi Ballardw&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for replying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data&lt;STRONG&gt; are already matched&lt;/STRONG&gt; using the match_ID variable that identifies matched case and controls. Each case can have more than one control. Varx (that takes value 0 or 1) is missing for all the controls in the dataset but for each matched control the value of Varx is the same as for the case (i.e., if Varx =0 for the case, it should also be 0 for the matched controls).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this clarify.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks again&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 17:46:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/All-Things-Community/How-to-attribute-a-value-of-a-given-variable-of-a-case-to-its/m-p/403638#M2738</guid>
      <dc:creator>arzon</dc:creator>
      <dc:date>2017-10-12T17:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to attribute a value of a given variable of a case to its matched control</title>
      <link>https://communities.sas.com/t5/All-Things-Community/How-to-attribute-a-value-of-a-given-variable-of-a-case-to-its/m-p/403655#M2739</link>
      <description>&lt;P&gt;This is a lookup or merge.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use a data step merge or SQL, and the COALESCE() function is helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Examples and explanations can be found here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=n1tgk0uanvisvon1r26lc036k0w7.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p1dou269qdd63qn1pwvy421uk3vl" target="_blank"&gt;http://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=n1tgk0uanvisvon1r26lc036k0w7.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p1dou269qdd63qn1pwvy421uk3vl&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 19:04:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/All-Things-Community/How-to-attribute-a-value-of-a-given-variable-of-a-case-to-its/m-p/403655#M2739</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-12T19:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to attribute a value of a given variable of a case to its matched control</title>
      <link>https://communities.sas.com/t5/All-Things-Community/How-to-attribute-a-value-of-a-given-variable-of-a-case-to-its/m-p/404116#M2740</link>
      <description>&lt;P&gt;Thank you reeza for your suggestion and the link you shared. It was helpful.&lt;/P&gt;&lt;P&gt;Have a nice weekend!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 20:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/All-Things-Community/How-to-attribute-a-value-of-a-given-variable-of-a-case-to-its/m-p/404116#M2740</guid>
      <dc:creator>arzon</dc:creator>
      <dc:date>2017-10-13T20:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to attribute a value of a given variable of a case to its matched control</title>
      <link>https://communities.sas.com/t5/All-Things-Community/How-to-attribute-a-value-of-a-given-variable-of-a-case-to-its/m-p/404456#M2748</link>
      <description>&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A id="link_8" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/169528" target="_self"&gt;arzon&lt;/A&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm glad you found some useful info! If one of the replies was the exact solution to your problem, can you "Accept it as a solution"? Or if one was particularly helpful, feel free to "Like" it. This will help other community members who may run into the same issue know what worked.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;Anna&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 14:00:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/All-Things-Community/How-to-attribute-a-value-of-a-given-variable-of-a-case-to-its/m-p/404456#M2748</guid>
      <dc:creator>AnnaBrown</dc:creator>
      <dc:date>2017-10-16T14:00:25Z</dc:date>
    </item>
  </channel>
</rss>

