<?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: Which day of the week has highest number of accidents? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Which-day-of-the-week-has-highest-number-of-accidents/m-p/77351#M256396</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;*get mean accidents per day;&lt;/P&gt;&lt;P&gt;proc summary noprint nway n&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data = have ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class days ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var accidents ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output out = want (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop = _type_ _freq_)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mean(accidents) = mean_accidents ;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then run a proc rank to get the highest if required.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jun 2012 02:23:32 GMT</pubDate>
    <dc:creator>SteveNZ</dc:creator>
    <dc:date>2012-06-07T02:23:32Z</dc:date>
    <item>
      <title>Which day of the week has highest number of accidents?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Which-day-of-the-week-has-highest-number-of-accidents/m-p/77348#M256393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Would someone please suggest the SAS procedure for arriving at the answer?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Two columns of data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Day of Week would be the numbers 1 - 7, a categorical variable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Response variable Accidents would be daily numbers, a continuous variable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px; font-size: 12pt;"&gt;Number of rows in data set is greater than 1000.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Any guidance appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Nicholas Kormanik&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2012 01:05:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Which-day-of-the-week-has-highest-number-of-accidents/m-p/77348#M256393</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2012-06-07T01:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Which day of the week has highest number of accidents?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Which-day-of-the-week-has-highest-number-of-accidents/m-p/77349#M256394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two possible options&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Proc FREQ - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; table day_of_week/chisq;&lt;/P&gt;&lt;P&gt;weight count;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that won't tell you which one is higher. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. An ANOVA based on the average number per day of week with contrast tests to isolate the one that is the highest. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2012 01:36:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Which-day-of-the-week-has-highest-number-of-accidents/m-p/77349#M256394</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-06-07T01:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Which day of the week has highest number of accidents?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Which-day-of-the-week-has-highest-number-of-accidents/m-p/77350#M256395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What would be the code for ANOVA?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sounds right, that SAS would have to calculate the average number of accidents for each day (1-7), and assess whether there is a significant difference between the days.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2012 01:47:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Which-day-of-the-week-has-highest-number-of-accidents/m-p/77350#M256395</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2012-06-07T01:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Which day of the week has highest number of accidents?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Which-day-of-the-week-has-highest-number-of-accidents/m-p/77351#M256396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;*get mean accidents per day;&lt;/P&gt;&lt;P&gt;proc summary noprint nway n&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data = have ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class days ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var accidents ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output out = want (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop = _type_ _freq_)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mean(accidents) = mean_accidents ;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then run a proc rank to get the highest if required.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2012 02:23:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Which-day-of-the-week-has-highest-number-of-accidents/m-p/77351#M256396</guid>
      <dc:creator>SteveNZ</dc:creator>
      <dc:date>2012-06-07T02:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Which day of the week has highest number of accidents?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Which-day-of-the-week-has-highest-number-of-accidents/m-p/77352#M256397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or Proc SQL approach:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input week$ accident;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 23&lt;/P&gt;&lt;P&gt;2 324&lt;/P&gt;&lt;P&gt;3 134&lt;/P&gt;&lt;P&gt;1 134&lt;/P&gt;&lt;P&gt;2 367&lt;/P&gt;&lt;P&gt;3 87&lt;/P&gt;&lt;P&gt;1 56&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select * from&lt;/P&gt;&lt;P&gt;&amp;nbsp; (select week, mean(accident) as max&lt;/P&gt;&lt;P&gt;&amp;nbsp; from have&lt;/P&gt;&lt;P&gt;&amp;nbsp; group by week)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; having max=max(max);&lt;/P&gt;&lt;P&gt;&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2012 02:51:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Which-day-of-the-week-has-highest-number-of-accidents/m-p/77352#M256397</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-06-07T02:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Which day of the week has highest number of accidents?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Which-day-of-the-week-has-highest-number-of-accidents/m-p/77353#M256398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been thinking as a statistician too long...did you need to test if its significantly different as well, or just after the largest number?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2012 16:55:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Which-day-of-the-week-has-highest-number-of-accidents/m-p/77353#M256398</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-06-07T16:55:17Z</dc:date>
    </item>
  </channel>
</rss>

