<?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 How to generate prevalence ratio (PR) adjusted for covariates using PROC GENMOD in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-prevalence-ratio-PR-adjusted-for-covariates/m-p/488955#M25406</link>
    <description>&lt;P&gt;Using SAS 9.4, I'm attempting to run a log-binomial regression model to generate prevalence ratios for the association between two variables ("race_gender," a 6-level categorical variable and "no_HIV_provider," a binary variable) adjusted for several covariates.&amp;nbsp; All covariates are binary variables except for "rel_status" and "employed," each of which are 3-level categorical variables.&amp;nbsp; The reference level = 0 for all variables.&amp;nbsp; I understand that with so many variables in the model, it is likely that the model may not converge.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I ran the code below, I received the output attached, including the error message: "ERROR:&amp;nbsp;The mean parameter is either invalid or at a limit of its range for some observations."&amp;nbsp; Does this mean that the model did not converge, or is there an error in my code that I need to fix?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need more information, please let me know.&amp;nbsp; Thanks for your guidance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jocelyn&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc genmod data = hiv.hrsaall86 descending;&lt;BR /&gt;class race_gender (ref='0') rel_status (ref='0') employed (ref='0')/param=ref;&lt;BR /&gt;model no_HIV_provider = race_gender age_at_intake homosexual ART_appropriate hs_grad rel_status homeless food_insecurity employed time_since_dx/ link=log dist=bin type3;&lt;BR /&gt;estimate "PR NHB male vs. NHW male" race_gender 1 0 0 0 0/exp;&lt;BR /&gt;estimate "PR Hisp male vs. NHW male" race_gender 0 1 0 0 0/exp;&lt;BR /&gt;estimate "PR NHW female vs. NHW male" race_gender 0 0 1 0 0/exp;&lt;BR /&gt;estimate "PR NHB female vs. NHW male" race_gender 0 0 0 1 0/exp;&lt;BR /&gt;estimate "PR Hisp female vs. NHW male" race_gender 0 0 0 0 1/exp;&lt;BR /&gt;estimate "PR age at intake" age_at_intake 1/exp;&lt;BR /&gt;estimate "PR homosexual vs. not homosexual" homosexual 1/exp;&lt;BR /&gt;estimate "PR ART appropriate vs. not" ART_appropriate 1/exp;&lt;BR /&gt;estimate "PR for divorced vs. single" rel_status 1 0/exp;&lt;BR /&gt;estimate "PR for married vs. single" rel_status 0 1/exp;&lt;/P&gt;&lt;P&gt;estimate "PR disabled/retired/controlled env vs. unemployed" employed 1 0/exp;&lt;BR /&gt;estimate "PR employed vs. unemployed" employed 0 1/exp;&lt;/P&gt;&lt;P&gt;estimate "PR HS grad vs. not" hs_grad 1/exp;&lt;/P&gt;&lt;P&gt;estimate "PR homeless vs. not" homeless 1/exp;&lt;BR /&gt;estimate "PR food insecure vs. not" food_insecurity 1/exp;&lt;BR /&gt;estimate "PR dx-ed &amp;gt; 2 years ago vs. not" time_since_dx 1/exp;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Aug 2018 15:54:23 GMT</pubDate>
    <dc:creator>jvaugh20</dc:creator>
    <dc:date>2018-08-22T15:54:23Z</dc:date>
    <item>
      <title>How to generate prevalence ratio (PR) adjusted for covariates using PROC GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-prevalence-ratio-PR-adjusted-for-covariates/m-p/488955#M25406</link>
      <description>&lt;P&gt;Using SAS 9.4, I'm attempting to run a log-binomial regression model to generate prevalence ratios for the association between two variables ("race_gender," a 6-level categorical variable and "no_HIV_provider," a binary variable) adjusted for several covariates.&amp;nbsp; All covariates are binary variables except for "rel_status" and "employed," each of which are 3-level categorical variables.&amp;nbsp; The reference level = 0 for all variables.&amp;nbsp; I understand that with so many variables in the model, it is likely that the model may not converge.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I ran the code below, I received the output attached, including the error message: "ERROR:&amp;nbsp;The mean parameter is either invalid or at a limit of its range for some observations."&amp;nbsp; Does this mean that the model did not converge, or is there an error in my code that I need to fix?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need more information, please let me know.&amp;nbsp; Thanks for your guidance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jocelyn&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc genmod data = hiv.hrsaall86 descending;&lt;BR /&gt;class race_gender (ref='0') rel_status (ref='0') employed (ref='0')/param=ref;&lt;BR /&gt;model no_HIV_provider = race_gender age_at_intake homosexual ART_appropriate hs_grad rel_status homeless food_insecurity employed time_since_dx/ link=log dist=bin type3;&lt;BR /&gt;estimate "PR NHB male vs. NHW male" race_gender 1 0 0 0 0/exp;&lt;BR /&gt;estimate "PR Hisp male vs. NHW male" race_gender 0 1 0 0 0/exp;&lt;BR /&gt;estimate "PR NHW female vs. NHW male" race_gender 0 0 1 0 0/exp;&lt;BR /&gt;estimate "PR NHB female vs. NHW male" race_gender 0 0 0 1 0/exp;&lt;BR /&gt;estimate "PR Hisp female vs. NHW male" race_gender 0 0 0 0 1/exp;&lt;BR /&gt;estimate "PR age at intake" age_at_intake 1/exp;&lt;BR /&gt;estimate "PR homosexual vs. not homosexual" homosexual 1/exp;&lt;BR /&gt;estimate "PR ART appropriate vs. not" ART_appropriate 1/exp;&lt;BR /&gt;estimate "PR for divorced vs. single" rel_status 1 0/exp;&lt;BR /&gt;estimate "PR for married vs. single" rel_status 0 1/exp;&lt;/P&gt;&lt;P&gt;estimate "PR disabled/retired/controlled env vs. unemployed" employed 1 0/exp;&lt;BR /&gt;estimate "PR employed vs. unemployed" employed 0 1/exp;&lt;/P&gt;&lt;P&gt;estimate "PR HS grad vs. not" hs_grad 1/exp;&lt;/P&gt;&lt;P&gt;estimate "PR homeless vs. not" homeless 1/exp;&lt;BR /&gt;estimate "PR food insecure vs. not" food_insecurity 1/exp;&lt;BR /&gt;estimate "PR dx-ed &amp;gt; 2 years ago vs. not" time_since_dx 1/exp;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 15:54:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-prevalence-ratio-PR-adjusted-for-covariates/m-p/488955#M25406</guid>
      <dc:creator>jvaugh20</dc:creator>
      <dc:date>2018-08-22T15:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate prevalence ratio (PR) adjusted for covariates using PROC GENMOD</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-prevalence-ratio-PR-adjusted-for-covariates/m-p/490123#M25449</link>
      <description>&lt;P&gt;That error is common when using the log link which doesn't assure that the&amp;nbsp;predicted values are valid probabilities. This, and better alternatives, are discussed in &lt;A href="http://support.sas.com/kb/23003" target="_self"&gt;this note&lt;/A&gt;. Probably&amp;nbsp;better to simply fit a logistic model in PROC LOGISTIC or PROC GENMOD and then use the NLMeans macro as shown there.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 15:34:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-generate-prevalence-ratio-PR-adjusted-for-covariates/m-p/490123#M25449</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2018-08-27T15:34:06Z</dc:date>
    </item>
  </channel>
</rss>

