<?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 Comparing prevalence rates across years in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195256#M10399</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I've just started using SAS and am trying to figure out how to compare prevalence rates across years and see average percent change (95% CI).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if allergy rates to Allergen A are:&lt;/P&gt;&lt;P&gt;2012 - 2.5%&lt;/P&gt;&lt;P&gt;2013- 5.6%&lt;/P&gt;&lt;P&gt;2014- 5.9%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the best way to determine the average percent change per annum?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, if allergy rates to Allergen B are:&lt;/P&gt;&lt;P&gt;2012- 1.7%&lt;/P&gt;&lt;P&gt;2013- 4.7%&lt;/P&gt;&lt;P&gt;2014- 0.7%&lt;/P&gt;&lt;P&gt;Is there a way to determine if there is a significant difference between rates for allergen A and B for the same year?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sherry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Jul 2015 13:58:10 GMT</pubDate>
    <dc:creator>SherryBerry</dc:creator>
    <dc:date>2015-07-03T13:58:10Z</dc:date>
    <item>
      <title>Comparing prevalence rates across years</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195256#M10399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I've just started using SAS and am trying to figure out how to compare prevalence rates across years and see average percent change (95% CI).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if allergy rates to Allergen A are:&lt;/P&gt;&lt;P&gt;2012 - 2.5%&lt;/P&gt;&lt;P&gt;2013- 5.6%&lt;/P&gt;&lt;P&gt;2014- 5.9%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the best way to determine the average percent change per annum?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, if allergy rates to Allergen B are:&lt;/P&gt;&lt;P&gt;2012- 1.7%&lt;/P&gt;&lt;P&gt;2013- 4.7%&lt;/P&gt;&lt;P&gt;2014- 0.7%&lt;/P&gt;&lt;P&gt;Is there a way to determine if there is a significant difference between rates for allergen A and B for the same year?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sherry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2015 13:58:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195256#M10399</guid>
      <dc:creator>SherryBerry</dc:creator>
      <dc:date>2015-07-03T13:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing prevalence rates across years</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195257#M10400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have the raw data that creates those proportions? If you don't have the N's then it's difficult to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so you can consider using the Cochran Armitage test via proc freq:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/procstat/63104/HTML/default/viewer.htm#procstat_freq_sect032.htm" title="http://support.sas.com/documentation/cdl/en/procstat/63104/HTML/default/viewer.htm#procstat_freq_sect032.htm"&gt;Base SAS(R) 9.2 Procedures Guide: Statistical Procedures, Third Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: I think I misunderstood your question, but my question still stands - do you have the raw data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2015 16:20:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195257#M10400</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-07-03T16:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing prevalence rates across years</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195258#M10401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a solution for the first part.&amp;nbsp; If there is more than one record per year you would add group by year at the end.&amp;nbsp; In this solution it's the average of every year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;infile cards;&lt;/P&gt;&lt;P&gt;input year rate;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;2012 2.5&lt;/P&gt;&lt;P&gt;2013 5.6&lt;/P&gt;&lt;P&gt;2014 5.9&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data prep;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;by year;&lt;/P&gt;&lt;P&gt;lrate = lag(rate);&lt;/P&gt;&lt;P&gt;diff_rate = rate-lrate;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table part1 as&lt;/P&gt;&lt;P&gt;select *,avg(diff_rate) as avg&lt;/P&gt;&lt;P&gt;from prep;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2015 17:28:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195258#M10401</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-07-03T17:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing prevalence rates across years</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195259#M10402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If all you want is the difference between the two averages this will get you there.&amp;nbsp; I'm guessing more information is valuable you can tweak the code.&amp;nbsp; Let me know if this helps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;infile cards;&lt;/P&gt;&lt;P&gt;input year ratea;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;2012 2.5&lt;/P&gt;&lt;P&gt;2013 5.6&lt;/P&gt;&lt;P&gt;2014 5.9&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data prep;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;by year;&lt;/P&gt;&lt;P&gt;lratea = lag(ratea);&lt;/P&gt;&lt;P&gt;diff_ratea = ratea-lratea;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table part1 as&lt;/P&gt;&lt;P&gt;select *,avg(diff_ratea) as avga&lt;/P&gt;&lt;P&gt;from prep;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have2;&lt;/P&gt;&lt;P&gt;infile cards;&lt;/P&gt;&lt;P&gt;input year rateb;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;2012 1.7&lt;/P&gt;&lt;P&gt;2013 4.7&lt;/P&gt;&lt;P&gt;2014 0.7&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data prep2;&lt;/P&gt;&lt;P&gt;set have2;&lt;/P&gt;&lt;P&gt;by year;&lt;/P&gt;&lt;P&gt;lrateb = lag(rateb);&lt;/P&gt;&lt;P&gt;diff_rateb = rateb-lrateb;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table prep_diff as&lt;/P&gt;&lt;P&gt;select *,avg(diff_rateb) as avgb&lt;/P&gt;&lt;P&gt;from prep2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table want as&lt;/P&gt;&lt;P&gt;select distinct a.avga-b.avgb as avg_diff&lt;/P&gt;&lt;P&gt;from&amp;nbsp; part1 a inner join&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prep_diff b on&lt;/P&gt;&lt;P&gt;a.year=b.year;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2015 17:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195259#M10402</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-07-03T17:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing prevalence rates across years</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195260#M10403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I do have the raw data that created these proportions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2015 19:36:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195260#M10403</guid>
      <dc:creator>SherryBerry</dc:creator>
      <dc:date>2015-07-03T19:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing prevalence rates across years</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195261#M10404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! This got me the average difference between each year exactly like I asked. Is there any way to determine if the rates for allergen A, for example, are statistically significantly different between years? (e.g. is 2.5% different from 5.9% with a 95% CI and p-value?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your code above, the output shows the average change between years (avga and avgb). Is there a way to see if these averages are statistically different from each other?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Sherry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2015 19:46:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195261#M10404</guid>
      <dc:creator>SherryBerry</dc:creator>
      <dc:date>2015-07-03T19:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing prevalence rates across years</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195262#M10405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you referring to the P value or is there another value that is significant for your purposes?&amp;nbsp; I'm not sure I"ll be able to help much more.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 13:42:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195262#M10405</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-07-06T13:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing prevalence rates across years</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195263#M10406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm referring to a p-value. The code that you provided gives me an annual avg percent change and I'm just looking to get a confidence interval for this change, if possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Sherry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 13:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195263#M10406</guid>
      <dc:creator>SherryBerry</dc:creator>
      <dc:date>2015-07-06T13:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing prevalence rates across years</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195264#M10407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With 3 data points, you don't have enough data to generate a P-Value and/or CI.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 15:47:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195264#M10407</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-07-06T15:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing prevalence rates across years</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195265#M10408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since the OP has the original data, then they can do this.&amp;nbsp; Any of the following could be adapted: FREQ (using Cochran-Armitage), MULTTEST (Cochran Armitage), CATMOD, GENMOD, GLIMMIX, LOGISTIC.&amp;nbsp; Personally, I would probably use GENMOD or GLIMMIX with a binomial distribution.&amp;nbsp; I would not fit year as a repeated measure, unless I had evidence that the same individuals were measured each year.&amp;nbsp; This rules out GEE as a method (and procedure).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 18:02:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-prevalence-rates-across-years/m-p/195265#M10408</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2015-07-06T18:02:02Z</dc:date>
    </item>
  </channel>
</rss>

