<?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: Binomial analysis in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546689#M8249</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data=fake descending
order=data;
class treatment animal;
model reactivity=treatment day/ d=bin link=logit;
repeated subject=animal / type=cs;
estimate "treatment" treatment 1 -1 / exp;&lt;BR /&gt;estimate "day" day / exp;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The above code fits a GEE model with the binomial distribution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Mar 2019 11:34:40 GMT</pubDate>
    <dc:creator>Rajesh3</dc:creator>
    <dc:date>2019-03-28T11:34:40Z</dc:date>
    <item>
      <title>Binomial analysis</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546664#M8243</link>
      <description>&lt;P&gt;Hello, I have two treatments (treated and control) with 20 animals each treatment.&lt;/P&gt;&lt;P&gt;And I have a reactivity score (0- no reactive and 1-reactive) from 10 days (day 1, 3, 5, 7, ..., 17, 19).&lt;/P&gt;&lt;P&gt;I would like to compare A and B by day just for escore 1.&lt;/P&gt;&lt;P&gt;So the objective is see if the treated group had less reactivity than group control on days 1 till 19.&lt;/P&gt;&lt;P&gt;They told me to use proc genmod or glimmix.&lt;/P&gt;&lt;P&gt;I have measure repeated in time: I have 10 information (1 information by day collected) per animal.&lt;/P&gt;&lt;P&gt;Can somebody help me, please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 19:54:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546664#M8243</guid>
      <dc:creator>aska_ujita</dc:creator>
      <dc:date>2019-03-27T19:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Binomial analysis</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546689#M8249</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data=fake descending
order=data;
class treatment animal;
model reactivity=treatment day/ d=bin link=logit;
repeated subject=animal / type=cs;
estimate "treatment" treatment 1 -1 / exp;&lt;BR /&gt;estimate "day" day / exp;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The above code fits a GEE model with the binomial distribution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 11:34:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546689#M8249</guid>
      <dc:creator>Rajesh3</dc:creator>
      <dc:date>2019-03-28T11:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Binomial analysis</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546878#M8287</link>
      <description>&lt;P&gt;Hi Rajesh, Thank you for your fast reply! Very kind of you, thank you very much for helping me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I tried to do it and it works for few, but I got errors in others.&lt;BR /&gt;&lt;BR /&gt;I put it like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc genmod data=C descending order=data;&lt;BR /&gt;class group cow dl po;&lt;BR /&gt;model react=group dl po/ d=bin link=logit;&lt;BR /&gt;repeated subject=cow/ type=cs;&lt;BR /&gt;estimate "group" group1 -1 / exp;&lt;BR /&gt;estimate "dl" dl1 -1/ exp;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;group is control and treat&lt;/P&gt;&lt;P&gt;dl is the day of lactation (1, 3, 5, 7, 9, 11, 13, 15, 17 and 19)&lt;/P&gt;&lt;P&gt;po is parturition order&lt;/P&gt;&lt;P&gt;react is the reactivity scored as 0 (without reactivity) and 1 (with reactivity).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In my table, I will just compare the score 1&amp;nbsp;(with reactivity). As example below:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;DL&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Reactivity&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Group Treated&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Group Control&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;P value&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;01&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;50&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;80&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;03&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;30&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;65&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;05&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;20&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;35&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I would like to have the P value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sometimes the difference between groups is large and the P value isn't significative.&lt;/P&gt;&lt;P&gt;And sometimes have errors like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: PROC GENMOD is modeling the probability that react='1'.&lt;BR /&gt;WARNING: The negative of the Hessian is not positive definite. The convergence is questionable.&lt;BR /&gt;WARNING: The procedure is continuing but the validity of the model fit is questionable.&lt;BR /&gt;WARNING: The specified model did not converge.&lt;BR /&gt;WARNING: Negative of Hessian not positive definite.&lt;BR /&gt;WARNING: The generalized Hessian matrix is not positive definite. Iteration will be terminated.&lt;BR /&gt;ERROR: Error in parameter estimate covariance computation.&lt;BR /&gt;ERROR: Error in estimation routine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm bit new in this... and a desesperate student.&lt;/P&gt;&lt;P&gt;Please, if you can help me, I am really glad.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Aska.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 12:58:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546878#M8287</guid>
      <dc:creator>aska_ujita</dc:creator>
      <dc:date>2019-03-28T12:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Binomial analysis</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546885#M8291</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data=C descending order=data;
class group cow po;
model react=group dl po/ d=bin link=logit;
repeated subject=cow/ type=cs;
estimate "group" group1 -1 / exp;
estimate "dl" dl/ exp;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The 'dl' variable need not be mentioned in the class statement. If you do not mention it in the class statement,&amp;nbsp;it will be treated as a continuous variable. Also, if you do not need to control for 'po' variable, please remove it from the model. Please check if the model converges with the above code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on the error that you are getting, you have specified a more complex model than your data can support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 13:12:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546885#M8291</guid>
      <dc:creator>Rajesh3</dc:creator>
      <dc:date>2019-03-28T13:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Binomial analysis</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546894#M8292</link>
      <description>&lt;P&gt;Thank you for you reply and help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works now, thank you for you explanation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, abusing again your goodwill and knowledge, now the results havent the information of estimate, SE, Z and Pr&amp;gt;Z values for each DL...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Aska.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 13:34:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546894#M8292</guid>
      <dc:creator>aska_ujita</dc:creator>
      <dc:date>2019-03-28T13:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Binomial analysis</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546897#M8293</link>
      <description>&lt;P&gt;It will not give estimates for each time point separately. Now the interpretation becomes "change in reactivity for a day increase in time". If you want to interpret it for 2 days increase multiply the estimate for 'dl' by 2 and exponentiate it to get the appropriate change. Else, replace the relevant estimate statement with the below code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;estimate 'dl'   dl 2/exp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 13:42:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546897#M8293</guid>
      <dc:creator>Rajesh3</dc:creator>
      <dc:date>2019-03-28T13:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Binomial analysis</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546902#M8295</link>
      <description>&lt;P&gt;Hello Rajesh, thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the last thing, I promise. When I put: estimate "dl" dl 1 -1/ exp;&lt;/P&gt;&lt;P&gt;What this "1 -1" means?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Aska.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 13:54:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546902#M8295</guid>
      <dc:creator>aska_ujita</dc:creator>
      <dc:date>2019-03-28T13:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Binomial analysis</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546904#M8296</link>
      <description>&lt;P&gt;If you included 'dl' in the class statement, the below SAS code will apply.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;estimate "dl" dl 1 -1/ exp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It means for a change in day from 1 to 3/1 to 5 (this will change based on the reference chosen but the concept is this), the change (increase/decrease) in the odds of having reactivity=1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you did not include 'dl' in the&amp;nbsp;class statement, the estimate statement should be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;estimate "dl" dl 1/ exp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It means, on average, for a unit increase in day, the change (increase/decrease) in the odds of having reactivity=1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 14:07:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546904#M8296</guid>
      <dc:creator>Rajesh3</dc:creator>
      <dc:date>2019-03-28T14:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Binomial analysis</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546909#M8297</link>
      <description>&lt;P&gt;Thank you Rajesh again.&lt;BR /&gt;&lt;BR /&gt;So that mean that is comparing day with day by genmod procedure.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;And probably I have to change my PROC because what I would like to do is compare the difference between groups for each day and not compare between days for presence of reactivity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for helping me!!! It really helped me!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Aska&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 14:27:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Binomial-analysis/m-p/546909#M8297</guid>
      <dc:creator>aska_ujita</dc:creator>
      <dc:date>2019-03-28T14:27:29Z</dc:date>
    </item>
  </channel>
</rss>

