<HTML>
<style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style><br>
99 it is. I will discuss documentation further with Karl as needed once I've had a look at it. 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);">> Right, the purpose of censoring the males is so they won't be </span><br>
<span style="color: rgb(102, 102, 102);">> recognized as</span><br>
<span style="color: rgb(102, 102, 102);">> "alive" (i.e., cannot have data entered after their statdates). </span><br>
<span style="color: rgb(102, 102, 102);">> Since we</span><br>
<span style="color: rgb(102, 102, 102);">> need to have a nonzero dcause for all animals not "alive" (status = </span><br>
<span style="color: rgb(102, 102, 102);">> 0), we</span><br>
<span style="color: rgb(102, 102, 102);">> will definitely need to add a dcause to go with the censored status.</span><br>
<span style="color: rgb(102, 102, 102);">> Currently the dcauses go from 0 to 8 (0 being alive and all others </span><br>
<span style="color: rgb(102, 102, 102);">> some form</span><br>
<span style="color: rgb(102, 102, 102);">> of dead). Shall we use 9 for censored? Or would a more removed </span><br>
<span style="color: rgb(102, 102, 102);">> number</span><br>
<span style="color: rgb(102, 102, 102);">> (like 99?) be preferred to make it more obvious that the animal isn't</span><br>
<span style="color: rgb(102, 102, 102);">> necessarily dead, yet is not recognized as "alive"?</span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">> I will look over the alive and dead documentation when I have a </span><br>
<span style="color: rgb(102, 102, 102);">> chance and</span><br>
<span style="color: rgb(102, 102, 102);">> see what may need to be changed. Thanks, Karl.</span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">> Niki</span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">> -----Original Message-----</span><br>
<span style="color: rgb(102, 102, 102);">> From: Karl O. Pinc [<a href="mailto:kop@meme.com">kop@meme.com</a>]</span><br>
<span style="color: rgb(102, 102, 102);">> Sent: Wednesday, November 25, 2009 4:35 PM</span><br>
<span style="color: rgb(102, 102, 102);">> To: Niki Learn; <a href="mailto:babase@eeblistserv.Princeton.EDU">babase@eeblistserv.Princeton.EDU</a></span><br>
<span style="color: rgb(102, 102, 102);">> Subject: Re: biograph question</span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">> On 11/25/2009 02:17:51 PM, Niki Learn wrote:</span><br>
<span style="color: rgb(102, 102, 102);">>> Karl,</span><br>
<span style="color: rgb(102, 102, 102);">>></span><br>
<span style="color: rgb(102, 102, 102);">>></span><br>
<span style="color: rgb(102, 102, 102);">>></span><br>
<span style="color: rgb(102, 102, 102);">>> So I was trying to implement this change to biograph where we censor</span><br>
<span style="color: rgb(102, 102, 102);">>> the old</span><br>
<span style="color: rgb(102, 102, 102);">>> animals and the males that have left the study groups and haven't</span><br>
<span style="color: rgb(102, 102, 102);">>> been</span><br>
<span style="color: rgb(102, 102, 102);">>> seen</span><br>
<span style="color: rgb(102, 102, 102);">>> for at least one update period.and I hit a snag. I added the new</span><br>
<span style="color: rgb(102, 102, 102);">>> status</span><br>
<span style="color: rgb(102, 102, 102);">>> code to the statuses table - 2 for Censored. But then if I try to</span><br>
<span style="color: rgb(102, 102, 102);">>> change an</span><br>
<span style="color: rgb(102, 102, 102);">>> individual to censored, I get this error message:</span><br>
<span style="color: rgb(102, 102, 102);">>></span><br>
<span style="color: rgb(102, 102, 102);">>></span><br>
<span style="color: rgb(102, 102, 102);">>></span><br>
<span style="color: rgb(102, 102, 102);">>> SQL error:</span><br>
<span style="color: rgb(102, 102, 102);">>></span><br>
<span style="color: rgb(102, 102, 102);">>> ERROR: new row for relation "biograph" violates check constraint</span><br>
<span style="color: rgb(102, 102, 102);">>> "Dcause</span><br>
<span style="color: rgb(102, 102, 102);">>> for live animal, or no dcause for dead animal"</span><br>
<span style="color: rgb(102, 102, 102);">>></span><br>
<span style="color: rgb(102, 102, 102);">>> In statement:</span><br>
<span style="color: rgb(102, 102, 102);">>> UPDATE "biograph" SET "bioid"='1386', "sname"='BAK', "name"='BAKARI',</span><br>
<span style="color: rgb(102, 102, 102);">>> "pid"=NULL, "birth"='1999-10-01', "bstatus"='1', "sex"='M',</span><br>
<span style="color: rgb(102, 102, 102);">>> "matgrp"='9.00',</span><br>
<span style="color: rgb(102, 102, 102);">>> "statdate"='2007-11-23', "status"='2', "dcause"='0' WHERE</span><br>
<span style="color: rgb(102, 102, 102);">>> "bioid"='1386'</span><br>
<span style="color: rgb(102, 102, 102);">>></span><br>
<span style="color: rgb(102, 102, 102);">>></span><br>
<span style="color: rgb(102, 102, 102);">>></span><br>
<span style="color: rgb(102, 102, 102);">>> 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);">>> dcause</span><br>
<span style="color: rgb(102, 102, 102);">>> 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);">>> "live"</span><br>
<span style="color: rgb(102, 102, 102);">>> (where live is only status 1) that does not have a dcause and since</span><br>
<span style="color: rgb(102, 102, 102);">>> the new</span><br>
<span style="color: rgb(102, 102, 102);">>> status of 2 does not have a dcause associated with it, babase doesn't</span><br>
<span style="color: rgb(102, 102, 102);">>> like</span><br>
<span style="color: rgb(102, 102, 102);">>> it. Even the one appearance of code 4 has a dcause of 7 (unknown)</span><br>
<span style="color: rgb(102, 102, 102);">>> even</span><br>
<span style="color: rgb(102, 102, 102);">>> though that individual isn't necessarily dead.</span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">> Yes, Babase requires that a BIOGRAPH.Status of 0 (0 not 1) be the</span><br>
<span style="color: rgb(102, 102, 102);">> only status where the individual is alive. (See the "Special Values"</span><br>
<span style="color: rgb(102, 102, 102);">> section in the docs on the STATUSES table:</span><br>
<span style="color: rgb(102, 102, 102);">> <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);">> )</span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">> Anybody who's not alive needs a dcause.</span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">>></span><br>
<span style="color: rgb(102, 102, 102);">>></span><br>
<span style="color: rgb(102, 102, 102);">>></span><br>
<span style="color: rgb(102, 102, 102);">>> So I guess that means either I should invent a dcause that's not</span><br>
<span style="color: rgb(102, 102, 102);">>> really a</span><br>
<span style="color: rgb(102, 102, 102);">>> dcause but a "censor cause" to go with the censored status or we need</span><br>
<span style="color: rgb(102, 102, 102);">>> to</span><br>
<span style="color: rgb(102, 102, 102);">>> revise the checks somehow. What do you advise? Can we make status 2</span><br>
<span style="color: rgb(102, 102, 102);">>> count</span><br>
<span style="color: rgb(102, 102, 102);">>> as live for the purposes of this check so it won't be violated or</span><br>
<span style="color: rgb(102, 102, 102);">>> would that</span><br>
<span style="color: rgb(102, 102, 102);">>> muck up other things?</span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">> 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);">> think we need to refine the definition of what "alive", Status code</span><br>
<span style="color: rgb(102, 102, 102);">> 0, means. IIRC what Status 0 means to the system is that you can</span><br>
<span style="color: rgb(102, 102, 102);">> put in data after the Statdate and the Statdate will then </span><br>
<span style="color: rgb(102, 102, 102);">> automatically</span><br>
<span style="color: rgb(102, 102, 102);">> update to the newer date. We probably don't want this behavior</span><br>
<span style="color: rgb(102, 102, 102);">> for censored individuals and so don't want to classify them as</span><br>
<span style="color: rgb(102, 102, 102);">> "alive" in this sense. Do we? IIRC anybody that's dead has</span><br>
<span style="color: rgb(102, 102, 102);">> a "Statdate that sticks", one that does not change and one</span><br>
<span style="color: rgb(102, 102, 102);">> that does not allow anything to happen to the individual</span><br>
<span style="color: rgb(102, 102, 102);">> after the Statdate. It seems right to have this sort of behavior</span><br>
<span style="color: rgb(102, 102, 102);">> for censored individuals but I want to hear what everybody</span><br>
<span style="color: rgb(102, 102, 102);">> else says.</span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">> "Alive" isn't really "alive in real life", it's "an individual</span><br>
<span style="color: rgb(102, 102, 102);">> on which new data is continuing to be collected".</span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">> So I'd go for adding a censored "cause of death" and using that</span><br>
<span style="color: rgb(102, 102, 102);">> along with the censored status value.</span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">> We also need to update the Babase system documentation to make</span><br>
<span style="color: rgb(102, 102, 102);">> all of this more clear; to document exactly what 'alive' means.</span><br>
<span style="color: rgb(102, 102, 102);">> It's in the documentation now but spread out in various places</span><br>
<span style="color: rgb(102, 102, 102);">> where it says what alive or dead individuals can or can't do.</span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">> We may want to search the documentation for the words 'alive'</span><br>
<span style="color: rgb(102, 102, 102);">> and 'dead' and see what comes up. (Via the "everything on</span><br>
<span style="color: rgb(102, 102, 102);">> one page version" would be easiest.) If you guys want me</span><br>
<span style="color: rgb(102, 102, 102);">> to do the work I can search the validation code for everyplace</span><br>
<span style="color: rgb(102, 102, 102);">> the status is tested for aliveness and come up with a list</span><br>
<span style="color: rgb(102, 102, 102);">> that way. This will give us a precise idea of exactly what</span><br>
<span style="color: rgb(102, 102, 102);">> alive means.</span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">> What does everybody else think and what should the above</span><br>
<span style="color: rgb(102, 102, 102);">> referenced documentation say about what it means to babase</span><br>
<span style="color: rgb(102, 102, 102);">> for an individual to be alive? What about the DCAUSES</span><br>
<span style="color: rgb(102, 102, 102);">> documentation. Should it say more?</span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">> Karl <<a href="mailto:kop@meme.com">kop@meme.com</a>></span><br>
<span style="color: rgb(102, 102, 102);">> Free Software: "You don't pay back, you pay forward."</span><br>
<span style="color: rgb(102, 102, 102);">> -- Robert A. Heinlein</span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">></span><br>
<span style="color: rgb(102, 102, 102);">> _______________________________________________</span><br>
<span style="color: rgb(102, 102, 102);">> Babase mailing list</span><br>
<span style="color: rgb(102, 102, 102);">> 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);">> <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>