<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>This makes sense.  They may, for example, have meant DEG for
Degan, Digit&#8217;s little brother - Dibble is their cousin.  DIG appears to
have dispersed at the end of Aug 2007 at age 4 ½.  So it does look like those 18
points for him are in error.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Luigi&#8217;s last neighbor date is the same as his first
absence date.  I guess it&#8217;s possible that some psion points were taken
before the census was done and that he was gone by the time the census took
place.  I will just change his censor date to that date (10 Dec 2007) instead
of the midpoint between the last day present and the first day absent.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Lacey, I&#8217;ll let you know if I find any more cases like
DIG.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
babase-bounces@eeblistserv.Princeton.EDU
[mailto:babase-bounces@eeblistserv.Princeton.EDU] <b>On Behalf Of </b>Lacey
Maryott Roerish<br>
<b>Sent:</b> Wednesday, January 20, 2010 10:52 AM<br>
<b>To:</b> The Baboon Database Project<br>
<b>Subject:</b> Re: [Babase] Samples/neighbors error when attempting to censor
males<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>We typically treat such data as errors, as in the team
either putting in the wrong sname, or simply having a typo. &nbsp;However, when
it occurs this much, I often talk with Susan about the possibility that he
wasn't really gone, just missed in a lot of censuses as a result of being left
off the sheet.<o:p></o:p></p>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<div>

<p class=MsoNormal>At any rate, our protocol calls for just changing it to unk
neighbor since it is clear someone was the neighbor, just not the animal the
team put in.<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<div>

<p class=MsoNormal>I will be out this afternoon with more appointments, but can
start to fix these tomorrow if need be.<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<div>

<p class=MsoNormal>As far as a view goes, we don't tend to use that data often,
and when we do, it is fairly simple to pull together with sample and point ids.
It just seems like a lot more than it is when presented in query format.<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'>Lacey<o:p></o:p></p>

<div>

<p class=MsoNormal>On Wed, Jan 20, 2010 at 10:46 AM, Niki Learn &lt;<a
href="mailto:nlearn@princeton.edu">nlearn@princeton.edu</a>&gt; wrote:<o:p></o:p></p>

<div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'>-----Original Message-----<br>
From: <a href="mailto:babase-bounces@eeblistserv.Princeton.EDU">babase-bounces@eeblistserv.Princeton.EDU</a><br>
[mailto:<a href="mailto:babase-bounces@eeblistserv.Princeton.EDU">babase-bounces@eeblistserv.Princeton.EDU</a>]
On Behalf Of Karl O. Pinc<br>
Sent: Tuesday, January 19, 2010 4:12 PM<br>
To: The Baboon Database Project<br>
Subject: Re: [Babase] Samples/neighbors error when attempting to censor<br>
males<br>
<br>
On 01/19/2010 01:11:55 PM, Niki Learn wrote:<br>
<br>
&gt; ERROR: &nbsp;DIG: BIOGRAPH.Statdate cannot be less than SAMPLES.Date<br>
&gt; unless<br>
&gt; NEIGHBORS.Sname individual is alive<br>
&gt;<br>
&gt; ERROR: &nbsp;LUI: BIOGRAPH.Statdate cannot be less than SAMPLES.Date<br>
&gt; unless<br>
&gt; NEIGHBORS.Sname individual is alive<br>
<br>
&gt; So I looked these guys up in samples and Luigi didn't even have an<br>
&gt; entry.<br>
&gt; Meanwhile Digit had many entries but his last entry was for 25 Aug<br>
&gt; 2007,<br>
&gt; which matches his last census entry and current statdate. &nbsp;I am<br>
&gt; trying<br>
&gt; to<br>
&gt; change his statdate to a censordate of 27 Aug 2007, which is NOT less<br>
&gt; than<br>
&gt; the last samples date. &nbsp;Neighbors doesn't even have dates. &nbsp;I'm
not<br>
&gt; real<br>
&gt; familiar with how those tables interact so I don't know where else to<br>
&gt; look<br>
&gt; for whatever is causing this error.<br>
<br>
The place to look is the social interactions ER diagram on page<br>
10 of the pocket reference.<br>
<br>
DIG is a neighbor of DIB as of 2008-10-13, so you can't &quot;stop his<br>
existance&quot; after 27 Aug 2007, which is what setting his Statdate<br>
back would do, when his Status is not 0 (alive). &nbsp;I presume you're<br>
also changing his Status to 2 (censored).<br>
<br>
select samples.date, samples.sname, neighbors.sname, neighbors.ncode<br>
&nbsp;from samples, point_data, neighbors<br>
&nbsp;where neighbors.sname = 'DIG'<br>
&nbsp; &nbsp; &nbsp; &nbsp;and neighbors.pntid = point_data.pntid<br>
&nbsp; &nbsp; &nbsp; &nbsp;and point_data.sid = samples.sid<br>
&nbsp;order by samples.date desc, samples.stime desc;<br>
<br>
We could change the rules for Status = 2 (censored) but<br>
I don't think we really want to. &nbsp;(Right?)<br>
<br>
The error message is not the best. &nbsp;The key indicator<br>
is that it talks about NEIGHBORS.Sname as the problematic<br>
column. &nbsp;I'd be happy to come up with a better message<br>
but suspect this is a systemic problem. &nbsp;I'm<br>
(very likely) using the same error message you'd get<br>
if you messed around in the NEIGHBORS table<br>
and have probably written error messages in this<br>
fashion all over the system. &nbsp;Anyhow, suggestions<br>
are welcome.<br>
<br>
I didn't look at LUI but I suspect something similar.<br>
If he's still a problem let me know and please tell<br>
me exactly what it was you were trying to do when<br>
you got the error. &nbsp;(I know your brain is running<br>
on empty at times these days.)<br>
<br>
Karl &lt;<a href="mailto:kop@meme.com">kop@meme.com</a>&gt;<br>
Free Software: &nbsp;&quot;You don't pay back, you pay forward.&quot;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -- Robert A. Heinlein<br>
<br>
<o:p></o:p></p>

</div>

</div>

<p class=MsoNormal>NIKI WRITES:<br>
Okay - that's a lot of typing to find out who someone's neighbor is.
&nbsp;Should<br>
we have a view for that or something?<br>
<br>
I'm still confused as to how DIG (or any others) could be listed as another<br>
baboon's neighbor after he has stopped showing up in the census. &nbsp;So Digit<br>
was last censused on 25 Aug 2007 but according to the output of Karl's code<br>
he was someone's neighbor 18 times after that in September 2007 and<br>
September and October 2008. &nbsp;How is this possible? &nbsp;And why isn't it<br>
reflected in his statdate?<br>
<br>
2008-10-13 | DIB &nbsp; | DIG &nbsp; | 1<br>
2008-10-13 | DIB &nbsp; | DIG &nbsp; | 1<br>
2008-10-13 | DIB &nbsp; | DIG &nbsp; | 1<br>
2008-09-18 | VIN &nbsp; | DIG &nbsp; | 1<br>
2008-09-18 | VIN &nbsp; | DIG &nbsp; | 1<br>
2008-09-18 | VIN &nbsp; | DIG &nbsp; | 1<br>
2008-09-18 | VIN &nbsp; | DIG &nbsp; | 1<br>
2008-09-18 | VIN &nbsp; | DIG &nbsp; | 1<br>
2008-09-18 | RIS &nbsp; | DIG &nbsp; | 2<br>
2008-09-06 | ROX &nbsp; | DIG &nbsp; | 1<br>
2008-09-06 | ROX &nbsp; | DIG &nbsp; | 1<br>
2008-09-06 | DIB &nbsp; | DIG &nbsp; | 3<br>
2008-03-24 | YOK &nbsp; | DIG &nbsp; | 1<br>
2008-03-24 | YOK &nbsp; | DIG &nbsp; | 1<br>
2007-09-01 | VEB &nbsp; | DIG &nbsp; | 1<br>
2007-09-01 | VEB &nbsp; | DIG &nbsp; | 1<br>
2007-09-01 | VEB &nbsp; | DIG &nbsp; | 1<br>
2007-09-01 | VEB &nbsp; | DIG &nbsp; | 2<br>
<br>
<o:p></o:p></p>

<div>

<div>

<p class=MsoNormal><br>
<br>
<o:p></o:p></p>

</div>

</div>

</div>

</div>

</div>

</body>

</html>