<?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 Using PROC NLIN to fit curves for dairy cattle and Proc Gplot to plot predicted values in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Using-PROC-NLIN-to-fit-curves-for-dairy-cattle-and-Proc-Gplot-to/m-p/435894#M23006</link>
    <description>&lt;P&gt;I am trying to fit lactation curves for different breeds of dairy cattle using Wood's curve with an adjustment&amp;nbsp;for season (s).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The model is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;y(t) = s &lt;SPAN&gt;a t^b e^-c*t&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current code is:&lt;/P&gt;&lt;P&gt;parms a=3 b=0.25 c=-0.0016;&lt;BR /&gt;model milk=season*(a*time**(b)*exp(-c*time);&lt;BR /&gt;by breed;&lt;BR /&gt;output out=pred1 p=predict r=residuals;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code for plotting predicted values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc gplot data=pred1;&lt;BR /&gt;plot predict*time=breed;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;run; quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when I plot the predicted production values for separate curves for each breed the graph instead plots all 3 breeds by season. How do I get this corrected so I&amp;nbsp; get the graphs for just the breeds and not every season?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the graph I'm getting and an example of the graph I am trying to get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="this is the graph I am getting that is not right" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18439i63901F5E78D5CC53/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.JPG" alt="this is the graph I am getting that is not right" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;this is the graph I am getting that is not right&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Here's an example of the graph I want" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18440iFABAE5E5A7FBF15E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Here's an example of the graph I want" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Here's an example of the graph I want&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Fri, 09 Feb 2018 22:17:05 GMT</pubDate>
    <dc:creator>houde030</dc:creator>
    <dc:date>2018-02-09T22:17:05Z</dc:date>
    <item>
      <title>Using PROC NLIN to fit curves for dairy cattle and Proc Gplot to plot predicted values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-PROC-NLIN-to-fit-curves-for-dairy-cattle-and-Proc-Gplot-to/m-p/435894#M23006</link>
      <description>&lt;P&gt;I am trying to fit lactation curves for different breeds of dairy cattle using Wood's curve with an adjustment&amp;nbsp;for season (s).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The model is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;y(t) = s &lt;SPAN&gt;a t^b e^-c*t&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current code is:&lt;/P&gt;&lt;P&gt;parms a=3 b=0.25 c=-0.0016;&lt;BR /&gt;model milk=season*(a*time**(b)*exp(-c*time);&lt;BR /&gt;by breed;&lt;BR /&gt;output out=pred1 p=predict r=residuals;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code for plotting predicted values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc gplot data=pred1;&lt;BR /&gt;plot predict*time=breed;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;run; quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when I plot the predicted production values for separate curves for each breed the graph instead plots all 3 breeds by season. How do I get this corrected so I&amp;nbsp; get the graphs for just the breeds and not every season?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the graph I'm getting and an example of the graph I am trying to get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="this is the graph I am getting that is not right" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18439i63901F5E78D5CC53/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.JPG" alt="this is the graph I am getting that is not right" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;this is the graph I am getting that is not right&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Here's an example of the graph I want" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18440iFABAE5E5A7FBF15E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Here's an example of the graph I want" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Here's an example of the graph I want&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2018 22:17:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-PROC-NLIN-to-fit-curves-for-dairy-cattle-and-Proc-Gplot-to/m-p/435894#M23006</guid>
      <dc:creator>houde030</dc:creator>
      <dc:date>2018-02-09T22:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC NLIN to fit curves for dairy cattle and Proc Gplot to plot predicted values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-PROC-NLIN-to-fit-curves-for-dairy-cattle-and-Proc-Gplot-to/m-p/435896#M23008</link>
      <description>&lt;P&gt;Try using by statement or where clause&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort data = pred1&lt;/P&gt;&lt;P&gt;&amp;nbsp;by breed;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc gplot data=pred1;&lt;/P&gt;&lt;P&gt;by breed;&lt;BR /&gt;plot predict*time;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or for more control to plot one breed at a time:&lt;/P&gt;&lt;P&gt;proc gplot data=pred1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;where breed = 'A';&lt;BR /&gt;plot predict*time;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2018 22:23:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-PROC-NLIN-to-fit-curves-for-dairy-cattle-and-Proc-Gplot-to/m-p/435896#M23008</guid>
      <dc:creator>Sascoder</dc:creator>
      <dc:date>2018-02-09T22:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC NLIN to fit curves for dairy cattle and Proc Gplot to plot predicted values</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-PROC-NLIN-to-fit-curves-for-dairy-cattle-and-Proc-Gplot-to/m-p/435898#M23009</link>
      <description>&lt;P&gt;The code still graphs&amp;nbsp;different curves for each&amp;nbsp;season instead of one average&amp;nbsp;curve for breed. I'm thinking there is something wrong in my Proc Nlin model.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2018 22:30:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-PROC-NLIN-to-fit-curves-for-dairy-cattle-and-Proc-Gplot-to/m-p/435898#M23009</guid>
      <dc:creator>houde030</dc:creator>
      <dc:date>2018-02-09T22:30:39Z</dc:date>
    </item>
  </channel>
</rss>

