<?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: PROC STDRATE: ERROR MESSAGE in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-STDRATE-ERROR-MESSAGE/m-p/710333#M218643</link>
    <description>&amp;gt; Perhaps counts for specific stratum is missing and it should be zero? If so, how do I go about addressing this issue?&lt;BR /&gt;&lt;BR /&gt;Yes, you need to have an entry for each group if it's 0. Make sure that each X has every strata, you cannot have missing categories. You can use PROC FREQ and the sparse option. I think the following works:&lt;BR /&gt;&lt;BR /&gt;proc freq data=data_set;&lt;BR /&gt;table age_group_5*gender / out=want sparse;&lt;BR /&gt;weight pop_denominator;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Sat, 09 Jan 2021 00:31:17 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-01-09T00:31:17Z</dc:date>
    <item>
      <title>PROC STDRATE: ERROR MESSAGE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-STDRATE-ERROR-MESSAGE/m-p/710323#M218634</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use proc stdrate to calculate age-standardized rates. I am however getting the following error message:&amp;nbsp;&lt;/P&gt;&lt;P&gt;"WARNING: The stratum in the REFDATA= data set, Age_Group_5=10- gender=F, does not have a matched stratum in the DATA= data set."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does the order of variables or sorting in the relevant data files matter? Perhaps counts for specific stratum is missing and it should be zero? If so, how do I go about addressing this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please help?! I would really appreciate it!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC STDRATE data=data_set&lt;BR /&gt;refdata=stdpop&amp;nbsp;&lt;BR /&gt;method=direct&amp;nbsp;&lt;BR /&gt;stat=rate (mult=1000)&amp;nbsp;&lt;BR /&gt;CL=gamma&amp;nbsp;;&lt;/P&gt;&lt;P&gt;*BY X;&amp;nbsp;&lt;BR /&gt;POPULATION event=counts=pop_denominator;&lt;BR /&gt;REFERENCE total=weight;&amp;nbsp;&lt;BR /&gt;STRATA Age_Group_5 gender;&amp;nbsp;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 22:36:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-STDRATE-ERROR-MESSAGE/m-p/710323#M218634</guid>
      <dc:creator>Jack_Smitherson</dc:creator>
      <dc:date>2021-01-08T22:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: PROC STDRATE: ERROR MESSAGE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-STDRATE-ERROR-MESSAGE/m-p/710333#M218643</link>
      <description>&amp;gt; Perhaps counts for specific stratum is missing and it should be zero? If so, how do I go about addressing this issue?&lt;BR /&gt;&lt;BR /&gt;Yes, you need to have an entry for each group if it's 0. Make sure that each X has every strata, you cannot have missing categories. You can use PROC FREQ and the sparse option. I think the following works:&lt;BR /&gt;&lt;BR /&gt;proc freq data=data_set;&lt;BR /&gt;table age_group_5*gender / out=want sparse;&lt;BR /&gt;weight pop_denominator;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 09 Jan 2021 00:31:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-STDRATE-ERROR-MESSAGE/m-p/710333#M218643</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-01-09T00:31:17Z</dc:date>
    </item>
  </channel>
</rss>

