<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">When it is called from within the basta function, MakeLifeTable subsets the data to only include those individuals that are born within the study period.<div><br></div><div>You can run MakeLifeTable *after* basta has run, on the out$Xq matrix.</div><div><br></div><div>e.g. MakeLifeTable(out$Xq[1,])</div><div><br></div><div>In the case where you make all birth dates within the study period, and the error messages are not produced, a life table will be produced.</div><div><br></div><div>out$lifeTable (note the upper case T in table - you had a typo in your code).</div><div><br></div><div><br></div><div>Cheers,</div><div>Owen</div><div><br><div><br></div><div><br><div><div>On 7 Nov 2011, at 11:45, Cliff Cunningham wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Fernando and Owen,<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>I get the "NULL" when I type</div><div>out$lifetable</div><div><br></div><div>even when I make all the birthdates at 1979 (within the time of the study), though these errors disappear:</div><div><br></div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div>.Warning messages:</div><div>1: In max(DeathAges, na.rm = TRUE) :</div><div> no non-missing arguments to max; returning -Inf</div><div>2: In max(wa) : no non-missing arguments to max; returning -Inf</div><div>3: In MakeLifeTable(x, ax = 0.5, n = 1) : NAs introduced by coercion</div></div></div></div></blockquote></div></div></div></blockquote><div><br></div><br><div><br><div><span class="Apple-tab-span" style="white-space:pre">        </span>On the very bright side I was able to calculate a great life table by hand that made perfect sense when I used</div><div><br></div><div>out$Xq</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>to output all the ages at death. This gave exactly the qx's I was expecting (since this example had 100% recapture rate, just to test the output). </div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>So its not that it wasn't calculating the ages at death.<br><div>
<div style="font-size: 12px; "><span class="Apple-tab-span" style="white-space: pre; ">        </span></div><div style="font-size: 12px; "><span class="Apple-tab-span" style="white-space: pre; ">        </span>All the best!</div><div style="font-size: 12px; "><br></div><div style="font-size: 12px; "> <span class="Apple-converted-space"> </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>Cliff Cunningham</div><div style="font-size: 12px; "><br></div><div style="font-size: 12px; "><br class="Apple-interchange-newline"> Professor</div><div style="font-size: 12px; "><span class="Apple-tab-span" style="white-space: pre; ">        </span>Biology Department</div><div style="font-size: 12px; "> <span class="Apple-tab-span" style="white-space: pre; ">        </span>Duke University</div><div style="font-size: 12px; "> 130 Science Drive</div><div style="font-size: 12px; "><span class="Apple-tab-span" style="white-space: pre; ">        </span>Durham NC 27708<br class="webkit-block-placeholder"></div><div style="font-size: 12px; "><span class="Apple-tab-span" style="white-space: pre; ">        </span>Phone 919-660-7356<br></div><div style="font-size: 12px; "><br></div><div style="font-size: 12px; "><a href="http://www.biology.duke.edu/cunningham">http://www.biology.duke.edu/cunningham</a></div><div style="font-size: 12px; "><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br><div><div>On Nov 7, 2011, at 11:23 AM, Colchero, Fernando wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Cliff,<div><br></div><div> Were all birth times in 1978? If that's the case, then the life table cannot be constructed because it uses non-truncated individuals (i.e. only those that were born during the study). Still, we do have a bug, since the model should report that more explicitly. We'll try to fix it as soon as possible.</div><div><br></div><div> Best,</div><div><br></div><div> Fernando<br><div>
<span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br class="Apple-interchange-newline">______________________________________________</div><div><div> </div><div>Fernando Colchero</div><div><br></div><div>Max Planck Institute for Demographic Research</div><div>Konrad Zuse Str. 1, 18057, Rostock, Germany</div><div>Tel: +49 (0) 381 2081 113</div><div>Fax: +49 (0) 381 2081 529</div><div><div>E-mail: <a href="mailto:Colchero@demogr.mpg.de">Colchero@demogr.mpg.de</a></div></div><div>______________________________________________</div></div><div><br></div><div><br></div></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline"></span>
</div>
<br><div><div>On Nov 7, 2011, at 11:03 AM, Cliff Cunningham wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear BaSTa,<div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>After several runs I have typed out$lifetable and got the following</div><div><br></div><div><div>> out$lifetable</div><div>NULL</div></div><div><br></div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>I should report I got several warning messages (see bottom) when I ran the following: </div><div><div>Survival parameters converged appropriately. </div><div>DIC was calculated</div><div>.Warning messages:</div><div>1: In max(DeathAges, na.rm = TRUE) :</div><div> no non-missing arguments to max; returning -Inf</div><div>2: In max(wa) : no non-missing arguments to max; returning -Inf</div><div>3: In MakeLifeTable(x, ax = 0.5, n = 1) : NAs introduced by coercion</div></div><div><br></div><div><br></div><div>My code was as follows, </div><div><br></div><div><div>out <- basta(object = Males.dat$newData, studyStart = 1979, studyEnd = 1982, burnin=1000 ,niter=10000, nsim=4, parallel=TRUE, ncpus=4)</div></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>In this one I had all the birthdays at 1978, and first captures in 1979.</div><div><br></div><div><br></div><div><br></div><div><br></div><div>Here are the errors from the </div><div>Multiple simulations finished.<div>Total MCMC computing time: 3.91 minutes</div><div><br></div><div>Thanks so much!!</div><div><div><div style="font-size: 12px; "><br></div><div style="font-size: 12px; "> <span class="Apple-converted-space"> </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>Cliff Cunningham</div><div style="font-size: 12px; "><br></div><div style="font-size: 12px; "><br class="Apple-interchange-newline"> Professor</div><div style="font-size: 12px; "><span class="Apple-tab-span" style="white-space: pre; ">        </span>Biology Department</div><div style="font-size: 12px; "> <span class="Apple-tab-span" style="white-space: pre; ">        </span>Duke University</div><div style="font-size: 12px; "> 130 Science Drive</div><div style="font-size: 12px; "><span class="Apple-tab-span" style="white-space: pre; ">        </span>Durham NC 27708<br class="webkit-block-placeholder"></div><div style="font-size: 12px; "><span class="Apple-tab-span" style="white-space: pre; ">        </span>Phone 919-660-7356<br></div><div style="font-size: 12px; "><br></div><div style="font-size: 12px; "><a href="http://www.biology.duke.edu/cunningham">http://www.biology.duke.edu/cunningham</a></div><div style="font-size: 12px; "><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br></div></div></div></div>_______________________________________________<br>Basta-users mailing list<br><a href="mailto:Basta-users@lists.r-forge.r-project.org">Basta-users@lists.r-forge.r-project.org</a><br><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/basta-users">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/basta-users</a><br></blockquote></div><br></div><p><span style="font-family:'Arial';font-size:8pt;">----------</span></p><p><span style="font-family:'Arial';font-size:8pt;">This mail has been sent through the MPI for Demographic Research. Should you receive a mail that is apparently from a MPI user without this text displayed, then the address has most likely been faked. If you are uncertain about the validity of this message, please check the mail header or ask your system administrator for assistance.</span></p><div><span style="font-family:'Arial';font-size:8pt;"> </span><br class="webkit-block-placeholder"></div></div>
</blockquote></div><br></div></div></div></div>_______________________________________________<br>Basta-users mailing list<br><a href="mailto:Basta-users@lists.r-forge.r-project.org">Basta-users@lists.r-forge.r-project.org</a><br>https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/basta-users<br></blockquote></div><br></div></div></body></html>