<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Caroline,<div><br></div><div> Sorry for the late reply. Actually, about your first enquiry, we found a bug that produced that error. We need to update the version of BaSTA that fixes that bug. About the memory problem, based on the information you sent us I think the issue is that you have a very large dataset and that you are running the model for many iterations. I quick fix will be to specify the argument burnin = 200 or even larger, the default value is 20. The advantage is that you will keep much fewer iterations, reducing the amount of memory you use, while you’ll also reduce serial autocorrelation. Let us know if this solves the issue.</div><div><br></div><div> Best,</div><div><br></div><div> Fernando</div><div><div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;"><b><br class="Apple-interchange-newline"><br></b></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;"><b>Fernando Colchero</b></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;">Assistant Professor</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;">Department of Mathematics and Computer Science</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;">Max-Planck Odense Center on the Biodemography of Aging</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;"><b><i><br></i></b></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;">Tlf. +45 65 50 23 24</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;">Email <a href="mailto:colchero@imada.sdu.dk">colchero@imada.sdu.dk</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;">Web <a href="http://www.sdu.dk/staff/colchero">www.sdu.dk/staff/colchero</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;">Pers. web <a href="http://www.sdu.dk/staff/colchero">www.colchero.com</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;">Adr. Campusvej 55, 5230, Odense, Dk</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;"><br></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;"><b>University of Southern Denmark</b></div>
</div>
<br><div><div>On 03 Aug 2014, at 01:46, Caroline Chong <<a href="mailto:caroline.chong@anu.edu.au">caroline.chong@anu.edu.au</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><blockquote type="cite"><blockquote type="cite"><br>Thanks Owen, Fernando<br><br>We are encountering problems with memory usage when running basta<br>analyses (using the latest version), and would be most grateful for<br>your suggestions on how to resolve the following situation. We're<br>running basta on a 64-bit linux and are able to commence basta runs<br>successfully (both in serial and parallel), but rapidly occupy 128 GB<br>RAM and all available swap (90 GB). The number of iterations is<br>currently set to 2 million but we have also attempted 1 million. We<br>are keen to run the final analyses, and will look forward to your<br>feedback (and from the basta community) with great anticipation.<br><br>- All iterations are currently stored in the PAR matrix. Is it<br>possible to store only the thinned chain in memory and write the full<br>chain to disc every (for example) 100000 iterations?<br><br>- If so, would this be a reasonably straightforward alteration to<br>implement in the current basta version, and what would this look like?<br><br>- Alternatively, could you please advise of any other methods to<br>reduce memory useage?<br><br>Example of basta commands are below. I am aiming to compare model<br>types (exponential, gompertz, logistic) run for each of 30 or more<br>species:<br><br>for (s in 1:length(species.list))<br>{<br><br> ### iterate through species list, read input matrix file<br> species <- species.list[s] <br> iM.spec <- read.delim(paste("inputmatg.", species, ".txt", sep=""),<br>header=T, sep=",") colnames(iM.spec)[4:112]<- 1:109<br><br> iM.spec[,4:112] <- sapply(iM.spec[,4:112], as.character)<br> iM.spec[,4:112] <- sapply(iM.spec[,4:112], as.numeric)<br><br> ### perform data check on imput matrix<br> iM.spec.basta <- DataCheck(iM.spec, studyStart = 1, studyEnd = 109,<br>autofix = rep(1, 7), silent = FALSE)<br><br> ### basta<br>speciesout <- basta(object = iM.spec.basta$newData, studyStart = 1,<br>studyEnd = 109, model = "GO", shape= "simple", nsim = 4, parallel =<br>TRUE, ncpus = 16, updateJumps = TRUE, niter = 2000000, burnin= 8001,<br>lifeTable=TRUE)<br>}<br>Example input matrix showing data for the first three individuals of<br>species1 only, for brevity:<br><br>"ID","birth","death","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99","100","101","102","103","104","105","106","107","108","109"<br>"1",1,0,68,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0<br>"2",2,0,68,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0<br>"3",3,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0<br><br><br>My second query is as per last week regarding the "Error in FUN(newX[,<br>i], ...) : invalid 'type' (character) of argument" error encountered<br>when attempting to include a single or multiple covariates<br>(particularly of type categorical), but re-posted here to the mailing<br>list in case the community can also help out. Do you have any<br>suggestions on how to code or name categorical covariates to<br>circumvent this error?<br><br>Many thanks for your help,<br>best regards<br>Caroline.<br><br><br><br>On 21 Jul 2014, at 23:52, caroline <<a href="mailto:caroline.chong@anu.edu.au">caroline.chong@anu.edu.au</a>> wrote:<br><br>Dear Owen/Fernando,<br><br>I was wondering whether you had any updated advice on how to code a<br>single or multiple categorical covariates to avoid the "FUN(newX[,i])"<br>error (similarly reported by Richard on 30 May 2014). I have checked<br>that the covariate names do not start with the same characters and<br>have also tried simplified names (a, b, c) to no avail so far. I would<br>be most happy to provide you with some of my data set if that would be<br>helpful for more context and to find the solution. I also intend to<br>use basta with both categorical and numeric covariates so would<br>appreciate any suggestions you may have on covariate naming.<br><br>Also, I would be grateful for your advice on deciphering the following<br>(run on a cluster with 32 cpus available):<br><br>iM.spec.basta <- DataCheck(iM.spec, studyStart = 1, studyEnd = 109,<br>autofix = rep(1, 7), silent = FALSE)<br><br>exspeciesout <- basta(object = iM.spec.basta$newData, studyStart = 1,<br>studyEnd = 109, model = "EX", shape= "simple", nsim = 4, parallel =<br>TRUE, ncpus = 16, updateJumps = TRUE, niter = 2000000, burnin= 8001,<br>lifeTable=TRUE)<br><br>Total MCMC computing time: 10.48 hours.<br><br>Survival parameters converged appropriately.<br>DIC was calculated.<br>Error: cannot allocate vector of size 109.5 Gb<br>Execution halted<br>Warning message:<br>system call failed: Cannot allocate memory<br><br>Warmest thanks for your assistance,<br>with best regards,<br>Caroline.<br><br><br><br>On 01/11/2013, at 8:54 AM, Owen Jones wrote:<br><br><blockquote type="cite">Dear Caroline,<br><br>This is a possible bug in one of the sub-functions in basta that<br>deals with the covariates. <br><br>We're investigating and will get back to you shortly.<br><br>Best wishes,<br>Owen<br><br><br><br><br>On 1 Nov 2013, at 14:01, caroline <<a href="mailto:caroline.chong@anu.edu.au">caroline.chong@anu.edu.au</a>> wrote:<br><br><blockquote type="cite">Dear All,<br><br>I am running a simple Gompertz model with one categorical<br>covariate, species (coded as species SPEC = a, b, c.... ah for<br>simplicity). After running DataCheck with autofix set to on, I<br>encounter the following error "in FUN(newX[,i]...)" - would you<br>have any experience with a similar situation, and could provide any<br>help or suggestions on how to interpret and trouble-shoot the<br>problem? I am unsure as to how to decipher where the error lies.<br>N.b. this data set seems to run ok when I do not include the<br>covariate matrix.<br><br>Very grateful for your help,<br>best regards<br>Caroline.<br><br>Caroline Chong<br>Postdoctoral Fellow<br>Research School of Biology<br>Australian National University, Canberra ACT<br><br>speciesout <- basta(object = inputMat2$newData, studyStart = 1,<br>studyEnd = 109, covarsStruct = "all.in.mort", nsim = 4, parallel =<br>TRUE, ncpus = 4, updateJumps = TRUE, niter = 100000) No problems<br>were detected with the data.<br><br>Error in FUN(newX[, i], ...) : invalid 'type' (character) of<br>argument<br></blockquote></blockquote><br><br><br></blockquote></blockquote></blockquote></div><br></div></body></html>