[Babase] repstats Q for Karl

kfenn kfenn at princeton.edu
Fri Jun 19 15:18:01 EDT 2009


Karl O. Pinc wrote:
>
> On 01/15/2009 12:27:42 PM, kfenn wrote:
>> Hi Karl,
>>
>> We have a lady in Repstats (LADHA) who remains in a pregnant state 
>> for up to 394 days (dins) in 2007 & 2008.  She gave birth on 28 May 
>> 2007 but continues to show up as "P" in the repstats table after this 
>> date.  The birth occurred on day 179 and somewhere I recall that we 
>> have a rule that includes a 180 day gestation period.  Of course this 
>> sounds nuts because obviously we have stillbirths and aborts before 
>> 180 days.
>>
>> Do you have any guesses why she might remain in this state so long?  
>> Why didn't the birth trigger a change in state in repstats?  I 
>> checked the documentation but I can't find the infosurrounding the 
>> triggers for change in state.
>
> The basic problem is that the triggers are not updating repstats
> or cycstats.  Theses must be manually updated by running the
> build program whenever any reproductive info is changed.
>
> My guess is that the rebuild_all_repstats program was run
> after all the sexual cycle information was entered
> but before the birth was entered.
> LAD does not have another cycle until 2008-06-06,
> so as far as the system is concerned she's still pregnant
> until then.  Of course after the birth is entered the
> next time rebuild_all_repstats is run the repstats
> file is fixed -- as we see in the table now.
>

I checked my logs on the demography update.  LAD7 (LAQ) was an 07a 
birth.  She was on the births .txt file that I archived after uploading 
to Babase.  However, she was a quirky one that required her pid to be 
omitted because, I think, the conception cycle also was getting uploaded 
in 07a. 

I guessed that omitting her pid would make the repstats table keep her 
in a constant pregnant state.  I tested this in babase_test by deleting 
the pid for another individual, NAP8, and rebuilding REPSTATS.  Sure 
enough, NAP never transitions after the birth of her offspring when the 
pid isn't in BIOGRAPH.  Makes perfect sense since that is the link 
REPSTATS has to BIOGRAPH.

So the question is...did I really forget to update her BIOGRAPH record 
with a pid at the end of 07a and not notice right through 2009?  During 
the babase_test runs for 07a I have notes on updating her pid but my 
notes on the final Babase run gets pretty bogged down in troubleshooting 
demog_census bugs (07a was the first update we ever did so it wouldn't 
be too surprising if that change slipped through the cracks when I got 
distracted with bigger problems).   I don't recall what was in Babase 
versus babase_test when Laurence first brought this to my attention in 
January.  But I don't remember having an 'A-Ha' moment when I realized 
the pid was missing. 

I've got lots of clear records that REPSTATS has been rebuild at the end 
of every demog update.  Indeed the table doesn't exist unless I rebuild 
because we HAVE to delete it at the beginning of every update.  Data 
don't go in unless we clear REPSTATS, CYCSTATS, MMINTERVALS, MDINTERVALS.

So, for the record, I'm going to assume I forgot the pid, realized the 
error, and plugged it in at some point in 2008 before the 08b update 
occurred.  I think REPSTATS got updated correctly after the 08b 
update.   I'm pretty sure the pid was in there when Laurence brought the 
error to my attention.  Although I can't exactly follow the paper trail 
to say this happened...all thing being equal it's the most logical and 
simplest explanation since 07a was such a chaotic update.  I don't think 
we have to worry about the REPSTATS programming being wrong.


Tabby


-- 
Tabby Fenn
Research Assistant

Dept of Ecology and Evolutionary Biology
401 Guyot Hall
Princeton University
Princeton, NJ  08544

609 258-6898 (Ph)
609 258-2712 (Fx)



More information about the Babase mailing list