<?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 proc freq riskdiff how to structure data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-freq-riskdiff-how-to-structure-data/m-p/953254#M372464</link>
    <description>&lt;P&gt;Hi all I have AE data which is structured like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Arm&amp;nbsp; Preferred_term&lt;/P&gt;
&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp; Headache&lt;/P&gt;
&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp; Zoster&lt;/P&gt;
&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp; Fatigue&lt;/P&gt;
&lt;P&gt;B&amp;nbsp;&amp;nbsp; Headache&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to use proc freq to create a data set containing risk difference (comparing Arm A and Arm B) like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Arm&amp;nbsp; Preferred_term Risk_diff&lt;/P&gt;
&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp; Headache&amp;nbsp; 0.45&lt;/P&gt;
&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp; Zoster&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.5&lt;/P&gt;
&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp; Fatigue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.1&lt;/P&gt;
&lt;P&gt;B&amp;nbsp;&amp;nbsp; Headache&amp;nbsp;&amp;nbsp; 0.2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I structure the data prior to using proc freq?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Dec 2024 16:37:50 GMT</pubDate>
    <dc:creator>kalbo</dc:creator>
    <dc:date>2024-12-11T16:37:50Z</dc:date>
    <item>
      <title>proc freq riskdiff how to structure data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-freq-riskdiff-how-to-structure-data/m-p/953254#M372464</link>
      <description>&lt;P&gt;Hi all I have AE data which is structured like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Arm&amp;nbsp; Preferred_term&lt;/P&gt;
&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp; Headache&lt;/P&gt;
&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp; Zoster&lt;/P&gt;
&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp; Fatigue&lt;/P&gt;
&lt;P&gt;B&amp;nbsp;&amp;nbsp; Headache&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to use proc freq to create a data set containing risk difference (comparing Arm A and Arm B) like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Arm&amp;nbsp; Preferred_term Risk_diff&lt;/P&gt;
&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp; Headache&amp;nbsp; 0.45&lt;/P&gt;
&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp; Zoster&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.5&lt;/P&gt;
&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp; Fatigue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.1&lt;/P&gt;
&lt;P&gt;B&amp;nbsp;&amp;nbsp; Headache&amp;nbsp;&amp;nbsp; 0.2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I structure the data prior to using proc freq?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 16:37:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-freq-riskdiff-how-to-structure-data/m-p/953254#M372464</guid>
      <dc:creator>kalbo</dc:creator>
      <dc:date>2024-12-11T16:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: proc freq riskdiff how to structure data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-freq-riskdiff-how-to-structure-data/m-p/953263#M372466</link>
      <description>&lt;P&gt;Relative risk and risk difference in Proc freq data structure would be basically one of two forms.&lt;/P&gt;
&lt;P&gt;Summarized data would have a risk variable with two levels (had/did not have exposure or risk) outcome (did/did not have outcome) and a count of cases. The count variable would be used as WEIGHT variable in Proc Freq.&lt;/P&gt;
&lt;P&gt;An example of this data appears in the Example section of Proc Freq in "Analysis of a 2x2 Contigency Table".&lt;/P&gt;
&lt;P&gt;as:&lt;/P&gt;
&lt;PRE&gt;data FatComp;
   input Exposure Response Count;
   label Response='Heart Disease';
   datalines;
0 0  6
0 1  2
1 0  4
1 1 11
;&lt;/PRE&gt;
&lt;P&gt;The other structure would be person/case level data where each observation is one case and just has the Exposure and Response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I might guess that your outcome or response is "have headache"/"do not have headache"&amp;nbsp;&amp;nbsp; "have zoster/do not have zoster".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I really hesitate to guess what your exposure or actual risk might be though. "Arm" sounds very unlikely to be a risk. So I suspect we are missing some details.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 18:26:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-freq-riskdiff-how-to-structure-data/m-p/953263#M372466</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-12-11T18:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: proc freq riskdiff how to structure data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-freq-riskdiff-how-to-structure-data/m-p/953315#M372470</link>
      <description>If you want to calculate risk difference, you need 2x2 contingency table.&lt;BR /&gt;Assuming row variable is ARM which have two levels (A and B),&lt;BR /&gt;But the column variable ( Preferred_term ) have four levels, &lt;BR /&gt;Therefore you are NOT able to get risk diff.&lt;BR /&gt;&lt;BR /&gt;Better give an example to illustrate how to calculate risk diff.</description>
      <pubDate>Thu, 12 Dec 2024 01:50:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-freq-riskdiff-how-to-structure-data/m-p/953315#M372470</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-12-12T01:50:33Z</dc:date>
    </item>
  </channel>
</rss>

