<HTML>
<style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style><br>
99 it is.&nbsp; I will discuss documentation further with Karl as needed once I've had a look at it.&nbsp; Thanks for the input!<br>
 <br>
<br>
<span style="font-weight: bold;">On Fri 04/12/09  9:57 AM , Susan Alberts alberts@duke.edu sent:<br>
</span><blockquote style="border-left: 2px solid rgb(245, 245, 245); margin-left: 5px; margin-right: 0px; padding-left: 5px; padding-right: 0px;">Yes, agreed, the purpose of having a "censored" category is that we  <br>

don't want the animal to be alive, but we also don't want them to be  <br>

dead. It's a third category. A dcause of 99 makes sense to me --  <br>

something that stands out from the rest of the list.<br>

<br>

S<br>

<br>

On Dec 3, 2009, at 10:06 PM, Niki Learn wrote:<br>

<br>

<span style="color: rgb(102, 102, 102);">&gt; Right, the purpose of censoring the males is so they won't be  </span><br>

<span style="color: rgb(102, 102, 102);">&gt; recognized as</span><br>

<span style="color: rgb(102, 102, 102);">&gt; "alive" (i.e., cannot have data entered after their statdates).   </span><br>

<span style="color: rgb(102, 102, 102);">&gt; Since we</span><br>

<span style="color: rgb(102, 102, 102);">&gt; need to have a nonzero dcause for all animals not "alive" (status =  </span><br>

<span style="color: rgb(102, 102, 102);">&gt; 0), we</span><br>

<span style="color: rgb(102, 102, 102);">&gt; will definitely need to add a dcause to go with the censored status.</span><br>

<span style="color: rgb(102, 102, 102);">&gt; Currently the dcauses go from 0 to 8 (0 being alive and all others  </span><br>

<span style="color: rgb(102, 102, 102);">&gt; some form</span><br>

<span style="color: rgb(102, 102, 102);">&gt; of dead).  Shall we use 9 for censored?  Or would a more removed  </span><br>

<span style="color: rgb(102, 102, 102);">&gt; number</span><br>

<span style="color: rgb(102, 102, 102);">&gt; (like 99?) be preferred to make it more obvious that the animal isn't</span><br>

<span style="color: rgb(102, 102, 102);">&gt; necessarily dead, yet is not recognized as "alive"?</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt; I will look over the alive and dead documentation when I have a  </span><br>

<span style="color: rgb(102, 102, 102);">&gt; chance and</span><br>

<span style="color: rgb(102, 102, 102);">&gt; see what may need to be changed.  Thanks, Karl.</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt; Niki</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt; -----Original Message-----</span><br>

<span style="color: rgb(102, 102, 102);">&gt; From: Karl O. Pinc [<a href="mailto:kop@meme.com">kop@meme.com</a>]</span><br>

<span style="color: rgb(102, 102, 102);">&gt; Sent: Wednesday, November 25, 2009 4:35 PM</span><br>

<span style="color: rgb(102, 102, 102);">&gt; To: Niki Learn; <a href="mailto:babase@eeblistserv.Princeton.EDU">babase@eeblistserv.Princeton.EDU</a></span><br>

<span style="color: rgb(102, 102, 102);">&gt; Subject: Re: biograph question</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt; On 11/25/2009 02:17:51 PM, Niki Learn wrote:</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; Karl,</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; So I was trying to implement this change to biograph where we censor</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; the old</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; animals and the males that have left the study groups and haven't</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; been</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; seen</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; for at least one update period.and I hit a snag.  I added the new</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; status</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; code to the statuses table - 2 for Censored.  But then if I try to</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; change an</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; individual to censored, I get this error message:</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; SQL error:</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; ERROR:  new row for relation "biograph" violates check constraint</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; "Dcause</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; for live animal, or no dcause for dead animal"</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; In statement:</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; UPDATE "biograph" SET "bioid"='1386', "sname"='BAK', "name"='BAKARI',</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; "pid"=NULL, "birth"='1999-10-01', "bstatus"='1', "sex"='M',</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; "matgrp"='9.00',</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; "statdate"='2007-11-23', "status"='2', "dcause"='0' WHERE</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; "bioid"='1386'</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; It looks like there is a check in biograph that says you can't have a</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; dcause</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; for an animal with status 1 and you can't have an animal that is not</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; "live"</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; (where live is only status 1) that does not have a dcause and since</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; the new</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; status of 2 does not have a dcause associated with it, babase doesn't</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; like</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; it.  Even the one appearance of code 4 has a dcause of 7 (unknown)</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; even</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; though that individual isn't necessarily dead.</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt; Yes, Babase requires that a BIOGRAPH.Status of 0 (0 not 1) be the</span><br>

<span style="color: rgb(102, 102, 102);">&gt; only status where the individual is alive.  (See the "Special Values"</span><br>

<span style="color: rgb(102, 102, 102);">&gt; section in the docs on the STATUSES table:</span><br>

<span style="color: rgb(102, 102, 102);">&gt; <a target="_blank" href="https://papio.biology.duke.edu/babase_system_html/ch06s02.html"><span style="color: red;">https://papio.biology.duke.edu/babase_system_html/ch06s02.html</span></a></span><br>

<span style="color: rgb(102, 102, 102);">&gt; )</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt; Anybody who's not alive needs a dcause.</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; So I guess that means either I should invent a dcause that's not</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; really a</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; dcause but a "censor cause" to go with the censored status or we need</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; to</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; revise the checks somehow.  What do you advise?  Can we make status 2</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; count</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; as live for the purposes of this check so it won't be violated or</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; would that</span><br>

<span style="color: rgb(102, 102, 102);">&gt;&gt; muck up other things?</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt; I don't think we want a status of 2 to be alive -- in other words I</span><br>

<span style="color: rgb(102, 102, 102);">&gt; think we need to refine the definition of what "alive", Status code</span><br>

<span style="color: rgb(102, 102, 102);">&gt; 0, means.  IIRC what Status 0 means to the system is that you can</span><br>

<span style="color: rgb(102, 102, 102);">&gt; put in data after the Statdate and the Statdate will then  </span><br>

<span style="color: rgb(102, 102, 102);">&gt; automatically</span><br>

<span style="color: rgb(102, 102, 102);">&gt; update to the newer date.  We probably don't want this behavior</span><br>

<span style="color: rgb(102, 102, 102);">&gt; for censored individuals and so don't want to classify them as</span><br>

<span style="color: rgb(102, 102, 102);">&gt; "alive" in this sense.  Do we?  IIRC anybody that's dead has</span><br>

<span style="color: rgb(102, 102, 102);">&gt; a "Statdate that sticks", one that does not change and one</span><br>

<span style="color: rgb(102, 102, 102);">&gt; that does not allow anything to happen to the individual</span><br>

<span style="color: rgb(102, 102, 102);">&gt; after the Statdate.  It seems right to have this sort of behavior</span><br>

<span style="color: rgb(102, 102, 102);">&gt; for censored individuals but I want to hear what everybody</span><br>

<span style="color: rgb(102, 102, 102);">&gt; else says.</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt; "Alive" isn't really "alive in real life", it's "an individual</span><br>

<span style="color: rgb(102, 102, 102);">&gt; on which new data is continuing to be collected".</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt; So I'd go for adding a censored "cause of death" and using that</span><br>

<span style="color: rgb(102, 102, 102);">&gt; along with the censored status value.</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt; We also need to update the Babase system documentation to make</span><br>

<span style="color: rgb(102, 102, 102);">&gt; all of this more clear; to document exactly what 'alive' means.</span><br>

<span style="color: rgb(102, 102, 102);">&gt; It's in the documentation now but spread out in various places</span><br>

<span style="color: rgb(102, 102, 102);">&gt; where it says what alive or dead individuals can or can't do.</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt; We may want to search the documentation for the words 'alive'</span><br>

<span style="color: rgb(102, 102, 102);">&gt; and 'dead' and see what comes up.  (Via the "everything on</span><br>

<span style="color: rgb(102, 102, 102);">&gt; one page version" would be easiest.)  If you guys want me</span><br>

<span style="color: rgb(102, 102, 102);">&gt; to do the work I can search the validation code for everyplace</span><br>

<span style="color: rgb(102, 102, 102);">&gt; the status is tested for aliveness and come up with a list</span><br>

<span style="color: rgb(102, 102, 102);">&gt; that way.  This will give us a precise idea of exactly what</span><br>

<span style="color: rgb(102, 102, 102);">&gt; alive means.</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt; What does everybody else think and what should the above</span><br>

<span style="color: rgb(102, 102, 102);">&gt; referenced documentation say about what it means to babase</span><br>

<span style="color: rgb(102, 102, 102);">&gt; for an individual to be alive?  What about the DCAUSES</span><br>

<span style="color: rgb(102, 102, 102);">&gt; documentation.  Should it say more?</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt; Karl &lt;<a href="mailto:kop@meme.com">kop@meme.com</a>&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt; Free Software:  "You don't pay back, you pay forward."</span><br>

<span style="color: rgb(102, 102, 102);">&gt;                 -- Robert A. Heinlein</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt;</span><br>

<span style="color: rgb(102, 102, 102);">&gt; _______________________________________________</span><br>

<span style="color: rgb(102, 102, 102);">&gt; Babase mailing list</span><br>

<span style="color: rgb(102, 102, 102);">&gt; Babase@<a target="_blank" href="<a href="http://www.eco.princeton.edu">http://www.eco.princeton.edu</a>">www.eco.princeton.edu</a></span><br>

<span style="color: rgb(102, 102, 102);">&gt; <a target="_blank" href="http://www.eco.princeton.edu/mailman/listinfo/babase"><span style="color: red;">http://www.eco.princeton.edu/mailman/listinfo/babase</span></a></span><br>

<br>

------------------------------------------------------------<br>

Susan Alberts, Dept of Biology, Duke University, Box 90338, Durham NC  <br>

27708. Phone 919-660-7272, FAX 919-660-7293<br>

<br>

<br>

<br>

_______________________________________________<br>

Babase mailing list<br>

Babase@<a target="_blank" href="<a href="http://www.eco.princeton.edu">http://www.eco.princeton.edu</a>">www.eco.princeton.edu</a><br>

<a target="_blank" href="http://www.eco.princeton.edu/mailman/listinfo/babase"><span style="color: red;">http://www.eco.princeton.edu/mailman/listinfo/babase</span></a><br>

<br>

</blockquote></HTML>