[Basta-users] Repeatable Error: 1: In max(DeathAges, na.rm = TRUE) :

Cliff Cunningham cliff at duke.edu
Wed Nov 9 00:22:45 CET 2011


Dear Basta,
	I get the following error  when I run this script:

 Fem1978only <- basta(object = Males.dat$newData, studyStart = 1978, studyEnd = 1982, model="GO" ,burnin=1000 ,niter=10000, nsim=4,parallel=TRUE, ncpus=4)

Survival parameters converged appropriately. 
DIC was calculated
.Warning messages:
1: In max(DeathAges, na.rm = TRUE) :
  no non-missing arguments to max; returning -Inf
2: In max(wa) : no non-missing arguments to max; returning -Inf
3: In MakeLifeTable(x, ax = 0.5, n = 1) : NAs introduced by coercion
Full script and errors below

This prevented me from using the out$lifeTable function, but was able to use the
out$Xq  function, and count the 50% deaths.

	  I have 943 individuals of unknown age studied with the Gompertz, all marked in 1978, and followed till 1982

	Of these 773 were only seen the first year of the study (1978), yet basta estimates the first deaths at 3 years of age 

	The qx for those first deaths at 3 years old is is extremely high, but the qx for year 2 is zero.

	I interpret this absence of deaths in year 2 as being a way to fit the Gompertz mortality curve to the data, starting at 0 mortlity, and going up.  If the deaths are reported in year 3, then year 2 has 0 mortality, and goes up rapidly (the first qx is 0.95)

	This seems incorrect to me: 773 were only seen in year 1, some must have died in year 2.  As you can see the pi is 0.94, so you wouldn't expect such a long lag time to report the first deaths.  

   Estimate   StdErr Lower95%CI Upper95%CI SerAutocor UpdateRate PotScaleReduc	
b0	-2.3926	0.183197	-2.7062	-2.0079	0.62626	0.3755	1.001
b1	0.6992	0.052093	0.5881	0.7925	0.60219	0.3755	1
pi	0.9438	0.009978	0.9223	0.9617	0.04917	1	1.001



When I run the individuals first marked in 1979 in the same population and  followed through to 1982, I get a similar pattern of first deaths at age 3, even though 660 of the total 768 individuls were only seen in 1979 and never again, also with extremely high "pi" values of 94%

   Estimate   StdErr Lower95%CI Upper95%CI SerAutocor UpdateRate PotScaleReduc	
b0	-2.3926	0.183197	-2.7062	-2.0079	0.62626	0.3755	1.001
b1	0.6992	0.052093	0.5881	0.7925	0.60219	0.3755	1
pi	0.9438	0.00991978	0.9223	0.9617	0.04917	1	1.001



Finally, when I combine the 1978 and 1979 marked individuals, all hell breaks loose.  No errors are reported, but the 

Fem78and79$lifeTable  command only reveals the life table for the 768 individuals first observed in 1979, even though basta reports that all 1711 individuals were read, and I can see all the ages at death when I use the Fem78and79$Xq  command

This gives individuals marked in 1978 their first deaths at age 3, and individuals marked in 1979 their first deaths at age 2.

	
	I know this is complicated, but this is a dataset you may want to take a look at, as I consider the output difficult to interpret.





	All the best!

   	Cliff Cunningham


        Professor
	Biology Department
    	Duke University
        130 Science Drive
	Durham NC 27708
	Phone 919-660-7356

http://www.biology.duke.edu/cunningham




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/basta-users/attachments/20111109/1f98f7c7/attachment-0001.htm>


More information about the Basta-users mailing list