<?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: number of cycles and length of each cycle in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/number-of-cycles-and-length-of-each-cycle/m-p/68731#M1633</link>
    <description>Can you give me the part of your observation with animal_id and other important variable which need to derive the cycle</description>
    <pubDate>Wed, 25 May 2011 12:04:08 GMT</pubDate>
    <dc:creator>Sudhakar_A</dc:creator>
    <dc:date>2011-05-25T12:04:08Z</dc:date>
    <item>
      <title>number of cycles and length of each cycle</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/number-of-cycles-and-length-of-each-cycle/m-p/68725#M1627</link>
      <description>How is it possible to determine the number of estrous cycles in dogs when the occurrence of the cycle is given.&lt;BR /&gt;
&lt;BR /&gt;
For instance, when the determinants of the cycle is given by DI,PR,ES,ME,S,P where DI=diestrus,PR=Proestrus,ES=estrus,ME=metestrus,S=sperm,P=plug. &lt;BR /&gt;
&lt;BR /&gt;
The occurrence of estrus is only that matters and the cycle is given by EST DI DI DI MET EST -- here the length of the cycle is 5 until the occurrence of next estrus.&lt;BR /&gt;
&lt;BR /&gt;
A cycle is calculated from one estrus to another estrus. The length of the cycle is the period until next estrus occurs which is 5 in the above case.&lt;BR /&gt;
&lt;BR /&gt;
How do I write a code to calculate this in Statistics. The endpoint is to calculate the number of cycles and length of each cycle.&lt;BR /&gt;
&lt;BR /&gt;
The output has to look like this:&lt;BR /&gt;
animal_id cycle1 cycle2 cycle3&lt;BR /&gt;
101            5         3          2&lt;BR /&gt;
102            2         3          1&lt;BR /&gt;
103            3         1          2</description>
      <pubDate>Mon, 23 May 2011 22:56:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/number-of-cycles-and-length-of-each-cycle/m-p/68725#M1627</guid>
      <dc:creator>saslover</dc:creator>
      <dc:date>2011-05-23T22:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: number of cycles and length of each cycle</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/number-of-cycles-and-length-of-each-cycle/m-p/68726#M1628</link>
      <description>Give me an example how your data looks like..</description>
      <pubDate>Tue, 24 May 2011 06:42:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/number-of-cycles-and-length-of-each-cycle/m-p/68726#M1628</guid>
      <dc:creator>Sudhakar_A</dc:creator>
      <dc:date>2011-05-24T06:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: number of cycles and length of each cycle</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/number-of-cycles-and-length-of-each-cycle/m-p/68727#M1629</link>
      <description>It has many variables. But the variable of interest has observations that look like this&lt;BR /&gt;
&lt;BR /&gt;
Est&lt;BR /&gt;
Di&lt;BR /&gt;
Met&lt;BR /&gt;
Sp&lt;BR /&gt;
Est&lt;BR /&gt;
&lt;BR /&gt;
and so on</description>
      <pubDate>Tue, 24 May 2011 09:39:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/number-of-cycles-and-length-of-each-cycle/m-p/68727#M1629</guid>
      <dc:creator>saslover</dc:creator>
      <dc:date>2011-05-24T09:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: number of cycles and length of each cycle</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/number-of-cycles-and-length-of-each-cycle/m-p/68728#M1630</link>
      <description>Is there any other variables which is useful to keep the same order of the records even if you sort it.&lt;BR /&gt;
&lt;BR /&gt;
we can do it 2 ways by transposing or in the dataset with common by variable.</description>
      <pubDate>Tue, 24 May 2011 10:03:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/number-of-cycles-and-length-of-each-cycle/m-p/68728#M1630</guid>
      <dc:creator>Sudhakar_A</dc:creator>
      <dc:date>2011-05-24T10:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: number of cycles and length of each cycle</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/number-of-cycles-and-length-of-each-cycle/m-p/68729#M1631</link>
      <description>here you go&lt;BR /&gt;
&lt;BR /&gt;
data hj;&lt;BR /&gt;
	input cat $15.;&lt;BR /&gt;
datalines;&lt;BR /&gt;
Est&lt;BR /&gt;
Di&lt;BR /&gt;
Met&lt;BR /&gt;
Sp&lt;BR /&gt;
Est&lt;BR /&gt;
di&lt;BR /&gt;
met&lt;BR /&gt;
met&lt;BR /&gt;
sp&lt;BR /&gt;
gh&lt;BR /&gt;
est&lt;BR /&gt;
kk&lt;BR /&gt;
lk&lt;BR /&gt;
kk&lt;BR /&gt;
jh&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data tjk;&lt;BR /&gt;
	set hj;&lt;BR /&gt;
	if upcase(cat)="EST" then newcy+1;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc freq data =tjk noprint;&lt;BR /&gt;
	tables newcy/out=tnum (drop=percent);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc transpose data=tnum out=tdurm prefix=cycle;&lt;BR /&gt;
	var count;&lt;BR /&gt;
	id newcy;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
if you want you can use the animal id as the by variable in all the steps&lt;BR /&gt;
&lt;BR /&gt;
Sudhakar</description>
      <pubDate>Tue, 24 May 2011 10:28:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/number-of-cycles-and-length-of-each-cycle/m-p/68729#M1631</guid>
      <dc:creator>Sudhakar_A</dc:creator>
      <dc:date>2011-05-24T10:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: number of cycles and length of each cycle</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/number-of-cycles-and-length-of-each-cycle/m-p/68730#M1632</link>
      <description>I tried using your code.. but it has so many missing values and I would be unable to delete them.&lt;BR /&gt;
Also the output has to look like this&lt;BR /&gt;
animl_no  cycle1 cycle2 cycle3&lt;BR /&gt;
101            2            2        3&lt;BR /&gt;
&lt;BR /&gt;
There are more than 400 cycles here, but in reality there are not more than 10 cycles. I have no clue how you get the 400 cycles.</description>
      <pubDate>Tue, 24 May 2011 13:34:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/number-of-cycles-and-length-of-each-cycle/m-p/68730#M1632</guid>
      <dc:creator>saslover</dc:creator>
      <dc:date>2011-05-24T13:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: number of cycles and length of each cycle</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/number-of-cycles-and-length-of-each-cycle/m-p/68731#M1633</link>
      <description>Can you give me the part of your observation with animal_id and other important variable which need to derive the cycle</description>
      <pubDate>Wed, 25 May 2011 12:04:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/number-of-cycles-and-length-of-each-cycle/m-p/68731#M1633</guid>
      <dc:creator>Sudhakar_A</dc:creator>
      <dc:date>2011-05-25T12:04:08Z</dc:date>
    </item>
  </channel>
</rss>

