<?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: Solving example - Weight gain for repeated measures in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Solving-example-Weight-gain-for-repeated-measures/m-p/238876#M12650</link>
    <description>&lt;P&gt;Good morning PG:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tested your procedure and it work perfectly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are a genious&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much&lt;/P&gt;</description>
    <pubDate>Fri, 11 Dec 2015 10:37:55 GMT</pubDate>
    <dc:creator>jonatan_velarde</dc:creator>
    <dc:date>2015-12-11T10:37:55Z</dc:date>
    <item>
      <title>Solving example - Weight gain for repeated measures</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Solving-example-Weight-gain-for-repeated-measures/m-p/238809#M12647</link>
      <description>&lt;P&gt;Good day SAS friends:&lt;BR /&gt;&lt;BR /&gt;Well, first to thank you a lot because all you help is usefull in my current research, well here i go with the last step of my avaliation, lets begin:&lt;BR /&gt;&lt;BR /&gt;As you know, the growing models are very usefull in many biological ares, specially in animal nutrition, there fore, this example is the resume os a dataset of 5000 animals in average, the reason that im posting this is i will not beable to do this manually, and SAS can help very much. My example has 3 animals observed in the time, and weighted&amp;nbsp; (repeated measures) several times to obtain the eficience and growing parameters of them.&lt;BR /&gt;&lt;BR /&gt;here is the data base:&lt;BR /&gt;&lt;BR /&gt;data have;&lt;BR /&gt;input Animal&amp;nbsp;&amp;nbsp;&amp;nbsp; age_in_days&amp;nbsp;&amp;nbsp;&amp;nbsp; weight_in_Kilograms;&lt;BR /&gt;cards;&lt;BR /&gt;&lt;STRONG&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.00&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 21&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.20&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 31&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.21&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 41&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.22&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 45&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.45&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 50&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.60&lt;/STRONG&gt;&lt;BR /&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; 43&amp;nbsp;&amp;nbsp;&amp;nbsp; 11.00&lt;BR /&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; 45&amp;nbsp;&amp;nbsp;&amp;nbsp; 11.30&lt;BR /&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; 49&amp;nbsp;&amp;nbsp;&amp;nbsp; 11.35&lt;BR /&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; 60&amp;nbsp;&amp;nbsp;&amp;nbsp; 11.30&lt;BR /&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; 65&amp;nbsp;&amp;nbsp;&amp;nbsp; 12.20&lt;BR /&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; 70&amp;nbsp;&amp;nbsp;&amp;nbsp; 12.50&lt;BR /&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; 76&amp;nbsp;&amp;nbsp;&amp;nbsp; 12.65&lt;BR /&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; 80&amp;nbsp;&amp;nbsp;&amp;nbsp; 13.00&lt;BR /&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; 95&amp;nbsp;&amp;nbsp;&amp;nbsp; 14.00&lt;BR /&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; 105&amp;nbsp;&amp;nbsp; 16.00&lt;BR /&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp; 11.00&lt;BR /&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp;&amp;nbsp;&amp;nbsp; 11.00&lt;BR /&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp; 33&amp;nbsp;&amp;nbsp;&amp;nbsp; 11.00&lt;BR /&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp; 43&amp;nbsp;&amp;nbsp;&amp;nbsp; 11.20&lt;BR /&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp; 44&amp;nbsp;&amp;nbsp;&amp;nbsp; 11.65&lt;BR /&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp; 45&amp;nbsp;&amp;nbsp;&amp;nbsp; 12.00&lt;BR /&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp; 46&amp;nbsp;&amp;nbsp;&amp;nbsp; 13.00&lt;BR /&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp; 50&amp;nbsp;&amp;nbsp;&amp;nbsp; 13.00&lt;BR /&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp; 60&amp;nbsp;&amp;nbsp;&amp;nbsp; 13.50&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;Untill here everything is good, to evaluate the eficience in the growing rate of each animal i need to obtain a new variable called "Mean daily Weight Gain", this explains in average the the weight gained from the begining day to the next (final) day, for example:&lt;BR /&gt;&lt;BR /&gt;The animal number 1 began to be weighted at the 11th day of the experiment with an observed weight of ten (10) kilograms and the next measure (of the same animal) at the 21th day is about 10.20 kilograms, this means clearly that in 10 days this animal gained 200 grams, and in average 0.02 Kg each day, to find this we can asume the next formula:&lt;BR /&gt;&lt;BR /&gt;(Final weight - Initial weight)/(Final day - Initial day) = (10.2 - 10.0)/(21 - 11)=0.02 Kilograms&lt;BR /&gt;&lt;BR /&gt;As you can see, this measure offers the observed weight gained using 2 measures, but the big problem is that i need several measures to trust in this result. The way to make it posible is to obtain the weight gained for each measure, well i constructed a table in excel to visualiza better this methodology:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="0" cellspacing="0"&gt;&lt;COLGROUP width="57"&gt;&lt;/COLGROUP&gt; &lt;COLGROUP width="109"&gt;&lt;/COLGROUP&gt; &lt;COLGROUP width="162"&gt;&lt;/COLGROUP&gt; &lt;COLGROUP span="5" width="45"&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD align="center" height="17"&gt;&lt;FONT face="Liberation Serif"&gt;Animal&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;Age_in_days&lt;/TD&gt;
&lt;TD align="center"&gt;Weight_In_Kilograms&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align="center" height="17"&gt;&lt;FONT face="Liberation Serif"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;&lt;FONT color="#FF0000"&gt;11&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;&lt;FONT color="#FF0000"&gt;10.000&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align="center" height="17"&gt;&lt;FONT face="Liberation Serif"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;&lt;FONT color="#FF0000"&gt;21&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;&lt;FONT color="#FF0000"&gt;10.200&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;0.020&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align="center" height="17"&gt;&lt;FONT face="Liberation Serif"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;&lt;FONT color="#3366FF"&gt;31&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;&lt;FONT color="#3366FF"&gt;10.210&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right"&gt;&lt;STRONG&gt;&lt;FONT color="#3366FF"&gt;0.011&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="right"&gt;&lt;STRONG&gt;0.001&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align="center" height="17"&gt;&lt;FONT face="Liberation Serif"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;&lt;FONT color="#000080"&gt;41&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;&lt;FONT color="#000080"&gt;10.220&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right"&gt;&lt;STRONG&gt;&lt;FONT color="#000080"&gt;0.007&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="right"&gt;&lt;STRONG&gt;0.001&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="right"&gt;&lt;STRONG&gt;0.001&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align="center" height="17"&gt;&lt;FONT face="Liberation Serif"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;&lt;FONT color="#FFCC00"&gt;45&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;&lt;FONT color="#FFCC00"&gt;10.450&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right"&gt;&lt;STRONG&gt;0.013&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="right"&gt;&lt;STRONG&gt;0.010&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="right"&gt;&lt;STRONG&gt;0.017&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="right"&gt;&lt;STRONG&gt;0.057&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="left"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align="center" height="17"&gt;&lt;FONT face="Liberation Serif"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;&lt;FONT color="#FFCC00"&gt;50&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;&lt;FONT color="#FFCC00"&gt;10.600&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right"&gt;&lt;STRONG&gt;0.015&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="right"&gt;&lt;STRONG&gt;0.014&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="right"&gt;&lt;STRONG&gt;0.021&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="right"&gt;&lt;STRONG&gt;0.042&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD align="right"&gt;&lt;FONT color="#FFCC00"&gt;&lt;STRONG&gt;0.030&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This tables shows what i explained before, i took the age of 11 days and 21 days and their respective weights, and could be obtained de gain (&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;IN RED&lt;/FONT&gt;&lt;/STRONG&gt;). So the numbers in "&lt;STRONG&gt;bold&lt;/STRONG&gt;" represent the weight gained using the next age as the initial measure, in &lt;STRONG&gt;&lt;FONT color="#FFCC00"&gt;ORANGE &lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;we can see the last measure or weight gain, taking the 45 as the inicial day and 50 as the final measure with 10.45 and 10.60 kilograms &lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;respectively, in here was obtained 0.03 Kg.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;Until now, we want to obtain the weight gained using 2 measures (the initial and the final), but once obtained all the means, i could perormance and general average like this:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="0" cellspacing="0"&gt;&lt;COLGROUP width="89"&gt;&lt;/COLGROUP&gt; &lt;COLGROUP span="4" width="45"&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD align="center" height="17"&gt;0.020&lt;/TD&gt;
&lt;TD align="center"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="center"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="center"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="center"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align="center" height="17"&gt;0.011&lt;/TD&gt;
&lt;TD align="center"&gt;0.001&lt;/TD&gt;
&lt;TD align="center"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="center"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="center"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align="center" height="17"&gt;0.007&lt;/TD&gt;
&lt;TD align="center"&gt;0.001&lt;/TD&gt;
&lt;TD align="center"&gt;0.001&lt;/TD&gt;
&lt;TD align="center"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="center"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align="center" height="17"&gt;0.013&lt;/TD&gt;
&lt;TD align="center"&gt;0.010&lt;/TD&gt;
&lt;TD align="center"&gt;0.017&lt;/TD&gt;
&lt;TD align="center"&gt;0.057&lt;/TD&gt;
&lt;TD align="center"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align="center" height="17"&gt;0.015&lt;/TD&gt;
&lt;TD align="center"&gt;0.014&lt;/TD&gt;
&lt;TD align="center"&gt;0.021&lt;/TD&gt;
&lt;TD align="center"&gt;0.042&lt;/TD&gt;
&lt;TD align="center"&gt;0.030&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align="center" height="17"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Total Average&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;0.017&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="center"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD align="center"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here the value os&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt; 0.017&lt;/FONT&gt; &lt;/STRONG&gt;means the total average of the complete set of means obtained en the past step. with this we can conclude that the animal 1 in 39 days, begining in the day 11 and finishing in the day 50 of the experiment, accomplished an average weght gain &lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;daily&lt;/SPAN&gt;&lt;/SPAN&gt; of &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;0.017&lt;/FONT&gt;&lt;/STRONG&gt;. This we can traduce into an new table:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Animal&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="0" cellspacing="0"&gt;&lt;COLGROUP width="57"&gt;&lt;/COLGROUP&gt; &lt;COLGROUP width="142"&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD align="center" height="17"&gt;&lt;FONT face="Liberation Serif"&gt;Animal&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;Avegare_Gain_by-day&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD align="center" height="17"&gt;&lt;FONT face="Liberation Serif"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="center"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;0.017&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This mus to be done for all the animals in the data set (data have) i &lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;proposed&lt;/SPAN&gt;&lt;/SPAN&gt; in the beginig of the post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So i hope you to help me, i will thank you for ever.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Big regards and thank you very much&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2015 23:46:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Solving-example-Weight-gain-for-repeated-measures/m-p/238809#M12647</guid>
      <dc:creator>jonatan_velarde</dc:creator>
      <dc:date>2015-12-10T23:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Solving example - Weight gain for repeated measures</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Solving-example-Weight-gain-for-repeated-measures/m-p/238837#M12648</link>
      <description>&lt;P&gt;Your estimator of weight gain is very similar to Sen's estimator of slope, also called Theil-Sen estimator or Kendall estimate of slope, see&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://en.wikipedia.org/wiki/Theil%E2%80%93Sen_estimator" target="_self"&gt;https://en.wikipedia.org/wiki/Theil%E2%80%93Sen_estimator&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;It is easy to calculate:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input Animal age weight;
cards;
1    11    10.00
1    21    10.20
1    31    10.21
1    41    10.22
1    45    10.45
1    50    10.60
2    43    11.00
2    45    11.30
2    49    11.35
2    60    11.30
2    65    12.20
2    70    12.50
2    76    12.65
2    80    13.00
2    95    14.00
2    105   16.00
3    10    11.00
3    20    11.00
3    33    11.00
3    43    11.20
4    44    11.65
4    45    12.00
4    46    13.00
4    50    13.00
4    60    13.50
;
proc sql;
create table slopes as
select 
    a.animal, 
    median( (b.weight-a.weight) / (b.age-a.age) ) as senSlope
from
    have as a inner join 
    have as b on a.animal=b.animal and a.age&amp;lt;b.age
group by a.animal;
select * from slopes;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You may replace the median by the mean, but the median is more robust (less sensitive to outliers).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 03:21:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Solving-example-Weight-gain-for-repeated-measures/m-p/238837#M12648</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-12-11T03:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Solving example - Weight gain for repeated measures</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Solving-example-Weight-gain-for-repeated-measures/m-p/238876#M12650</link>
      <description>&lt;P&gt;Good morning PG:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tested your procedure and it work perfectly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are a genious&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 10:37:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Solving-example-Weight-gain-for-repeated-measures/m-p/238876#M12650</guid>
      <dc:creator>jonatan_velarde</dc:creator>
      <dc:date>2015-12-11T10:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Solving example - Weight gain for repeated measures</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Solving-example-Weight-gain-for-repeated-measures/m-p/239072#M12655</link>
      <description>&lt;P&gt;One more time thank you for your answer:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One question went out during my data procesing, and it is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;using the code you provided here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;sql&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
create &lt;SPAN class="token statement"&gt;table&lt;/SPAN&gt; slopes as
&lt;SPAN class="token statement"&gt;select&lt;/SPAN&gt; 
    a&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;animal&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; 
    &lt;SPAN class="token function"&gt;median&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;b&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token statement"&gt;weight&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt;a&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token statement"&gt;weight&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;b&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;age&lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt;a&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;age&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; as senSlope
&lt;SPAN class="token keyword"&gt;from&lt;/SPAN&gt;
    have as a inner join 
    have as b on a&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;animal&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;b&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;animal and a&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;age&lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt;b&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;age
&lt;SPAN class="token keyword"&gt;group&lt;/SPAN&gt; &lt;SPAN class="token statement"&gt;by&lt;/SPAN&gt; a&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;animal&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token statement"&gt;select&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;*&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;from&lt;/SPAN&gt; slopes&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;quit&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;How could i do to use the mean of the observations, with no interference of using the age??? &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks you very much&lt;/P&gt;</description>
      <pubDate>Sun, 13 Dec 2015 22:50:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Solving-example-Weight-gain-for-repeated-measures/m-p/239072#M12655</guid>
      <dc:creator>jonatan_velarde</dc:creator>
      <dc:date>2015-12-13T22:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Solving example - Weight gain for repeated measures</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Solving-example-Weight-gain-for-repeated-measures/m-p/239087#M12659</link>
      <description>&lt;P&gt;Not sure I understand your question. Sen's slope is the &lt;STRONG&gt;median&lt;/STRONG&gt; of all the slopes between pairs of points. You could replace the &lt;STRONG&gt;median&lt;/STRONG&gt; with the &lt;STRONG&gt;mean,&lt;/STRONG&gt; if you prefer. It should give you about the same values, anyway.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2015 03:01:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Solving-example-Weight-gain-for-repeated-measures/m-p/239087#M12659</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-12-14T03:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Solving example - Weight gain for repeated measures</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Solving-example-Weight-gain-for-repeated-measures/m-p/241269#M12750</link>
      <description>&lt;P&gt;This makes some very VERY large assumptions about growth over these time periods. &amp;nbsp;This assumes that growth rate is independent of initial body weight and of mature body size, and where the individual is on the growth trajectory--all of which are inaccurate, especially when it come to estimating efficiency. &amp;nbsp;While this is an interesting approach to growth and efficiency from a mathematical point of view, it doesn't fit well with the known literature. &amp;nbsp;See, for example, Mercer (1980) Mathematical models in nutrition. Nutr. Rept Int. 21, 189-198 and Mercer et al. (1979) Prediction of food intakes and growht rates in weanling rats by the four-parameter model equation. Nutr. Rept. Int, 19, 1-8.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would provide a good starting parameter for nonlinear modeling.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2015 19:06:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Solving-example-Weight-gain-for-repeated-measures/m-p/241269#M12750</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2015-12-30T19:06:25Z</dc:date>
    </item>
  </channel>
</rss>

