[Basta-users] stability/convergence issues with some models in BaSTA?
Fernando Arce Gonzalez
fernando.arcegonzalez at utas.edu.au
Tue Apr 30 13:34:36 CEST 2019
Thank you Fernando. I'll send you off-list some data :)
What I mean with running sexes separately, was more on evaluating different shapes for each sex, which wouldn't surprise me.
Best regards
Fer
________________________________
From: Fernando Colchero <colchero at imada.sdu.dk>
Sent: Tuesday, April 30, 2019 8:36:49 PM
To: Fernando Arce Gonzalez
Cc: BaSTA users users
Subject: Re: [Basta-users] stability/convergence issues with some models in BaSTA?
Hi Fernando,
Thanks for your interest in BaSTA and for sticking to it despite the convergence problems. Sometimes the problems might have to do with the specification of times of birth and death, or issues with the covariates. Maybe if you want, send me a sample of your data and I’ll try to find out what could be affecting convergence. In general the Siler model should converge. About running the sexes in separate models, that would give you roughly the same answer, so you can separate the sexes.
Best,
Fernando
_________________________________
Fernando Colchero
Associate Professor
Department of Mathematics and Computer Science
Interdisciplinary Center on Population Dynamics
Tlf. +45 65 50 23 24
Email colchero at imada.sdu.dk<mailto:colchero at imada.sdu.dk>
Web www.sdu.dk/staff/colchero<http://www.sdu.dk/staff/colchero>
Pers. web www.colchero.com<http://www.colchero.com>
Adr. Campusvej 55, 5230, Odense, Dk
University of Southern Denmark
_________________________________
On 29 Apr 2019, at 13:38, Fernando Arce Gonzalez <fernando.arcegonzalez at utas.edu.au<mailto:fernando.arcegonzalez at utas.edu.au>> wrote:
Good afternoon:
I ran roughly a year ago some models with BaSTA to some data I have around. I was using a subset of the data (truncated to not include all years that spans 1984:2017).
The model specs were: model: GO, shape: bathtub, covs structure: fussed, and the only covariate was sex.
This configuration never converged, but the results were consistent with the species ecology, pointing the big differences in the mortality hazzard rate curve shapes between sexes.
I initially though it could be just a matter of running longer chains, but some months ago I guy I know told me that he tried to fit a Siler model in a similar dataset (same species, less data, using his own code), but it was not very stable. So recently I have gone back to it and check some models output
Settings
mod1 mod2 mod3
niter 200000 400000 1000000
burnin 197000 397000 990000
thinning 20 20 20
nsim 2 2 2
and this is the potential scale reduction factor (for clarity, I split it into Females and males):
females:
mod1 mod2 mod3
a0.f 0.9982876 1.1061251 0.9999246
a1.f 1.5281294 1.1214647 0.9992686
c.f 0.9971761 4.7816934 1.1177012
b0.f 1.6284601 2.8833760 1.1821780
b1.f 3.8061436 2.4666239 1.2615155
Males
mod1 mod2 mod3
a0.m 1.0421634 1.0033493 1.1864240
a1.m 1.0001222 0.9985314 1.3429417
c.m 1.0671795 0.9966957 2.4725801
b0.m 1.0945299 0.9968903 2.5274575
b1.m 1.0742245 0.9966948 2.3528640
for the females, 400.000 iterations gave worse convergence than 200.000 (unexpected). 1 million iterations, as expected, gets the better values and close to converge. On the other side, for males, 400.000 better than 200.000 (but both offered convergence), but 1 million goes pretty bad. To add some 'fun', I have checked a model with the same structured with 20.000 iterations and very similar data (I included those individuals of unknown sex as a third sex category, very very few) and it converged as a champ.
To add some info of the dataset, it is roughly 20.000 individuals, and I have only used data from 1984 to 2009. It is pretty well balanced in terms of covariates (close to 50% males 50% females). Roughly 1/3 of the animals had never been re-observed, which is fair as they are marked when they are weaned and nobody will check for them till next breeding season, when they still may be or not at the colony as they won't became adults until at least age 3 (females). Also, that cames from DataCheck:
*DataSummary*
- Number of individuals = 20,504
- Number with known birth year = 18,261
- Number with known death year = 0
- Number with known birth
AND death years = 0
- Total number of detections
in recapture matrix = 38,362
- Earliest detection time = 1985
- Latest detection time = 2009
- Earliest recorded birth year = 1985
- Latest recorded birth year = 2005
and this too (I have modify DataCheck locally to avoid printing row numbers, I just want the number of rows with issues, not to have printed >1800 row numbers):
17 rows have observations that occur before the year of birth
Observations that pre-date year of birth have been removed.
18320 rows have a one in the recapture matrix in the birth year
135 rows have caterogical covariates adding to 0
These records have been removed from the Dataframe
Given that, any suggestion? I did try to run more chains, shorter, with no luck either. I cannot find those model objects. So I wonder it has to do with the data or with the model itself? Now I have more computer free time to run these models (they take a lot of time) so I want to give it another go. I was wondering about splittiing the dataset by sex before modelling, and run different, independent modelling for each sex. I think that would be sensible, as males and females are quite different and are expected to have different curves of mortality hazard rates, but not sure still, specially looking to the males pattern (1 million iters being worse than 200.000)
Best regards and thanks in advance:
Fer
This is how the table of the factors looks from R
> scaleRedFactor
mod1 mod2 mod3
a0.f 0.9982876 1.1061251 0.9999246
a0.m 1.0421634 1.0033493 1.1864240
a1.f 1.5281294 1.1214647 0.9992686
a1.m 1.0001222 0.9985314 1.3429417
c.f 0.9971761 4.7816934 1.1177012
c.m 1.0671795 0.9966957 2.4725801
b0.f 1.6284601 2.8833760 1.1821780
b0.m 1.0945299 0.9968903 2.5274575
b1.f 3.8061436 2.4666239 1.2615155
b1.m 1.0742245 0.9966948 2.3528640
pi.1984 0.9989825 0.9969165 0.9991626
University of Tasmania Electronic Communications Policy (December, 2014).
This email is confidential, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone outside the intended recipient organisation is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender. The views expressed in this email are not necessarily the views of the University of Tasmania, unless clearly intended otherwise.
_______________________________________________
Basta-users mailing list
Basta-users at lists.r-forge.r-project.org<mailto:Basta-users at lists.r-forge.r-project.org>
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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/basta-users/attachments/20190430/0d87a583/attachment-0001.html>
More information about the Basta-users
mailing list