© Marcel Burkhardt
Code for running BPA using JAGS
JAGS (the acronym for Just another Gibbs sampler), developed by Martyn Plummer, is another MCMC engine that can be used for a Bayesian analysis of population models. Importantly, JAGS uses almost the identical model definition language (the BUGS language) as does WinBUGS and OpenBUGS. JAGS can be downloaded for free from http://mcmc-jags.sourceforge.net/ and may be run from R in a very similar way as WinBUGS. The R package R2jags (and, internally, rjags) is required. We have found that JAGS is often faster than WinBUGS for the examples in the book. In addition, JAGS runs on Macs, hence, it may be an interesting alternative for many researchers. Quite exciting is the ability for parallel computing with JAGS, which should GREATLY speed up MCMC computations; see function parallel.jags() in the latest version of the R2jags package.
Although most examples in the book and in the solutions should run in JAGS with only minor code adaptations, we here provide the complete book code translated into JAGS. Since JAGS uses a slight dialect of the BUGS language, only very few changes were needed. However, JAGS has sometimes a different behaviour than WinBUGS. In particular, JAGS seems much more sensitive to the choice of starting values; if inappropriate initial values are chosen, updating does not even start. In particular, initial values for the latent state variables (which we often call z in our book) need initial values that are consistent with the observed data. For example, if an individual is known to be alive at a certain occasion t, because it was seen before and after t, but it was not observed at t, an initial value of zt = 0 would cause an error in JAGS. Finding appropriate initial values can be particularly difficult in multistate capture-recapture models where the coding of the observed states and the coding of the true states need not necessarily match. In the following document, we provide some R code to generate appropriate initial values for all the examples treated in the book.
Informationen Corona-Virus
Gemäss den Corona-Regelungen des Bundes bleibt das Besuchszentrum bis am 28. Februar 2021 geschlossen.
Unsere Vogelpflegestation funktioniert wie gewohnt weiter. Vögel nehmen wir täglich (Montag-Sonntag) von 09.00-12.00 und von 13.30-17.00 Uhr entgegen.
Aufgrund der verschärften Corona-Massnahmen sind unsere Mitarbeiterinnen und Mitarbeiter grösstenteils im Home Office. Bitte haben Sie Verständnis, wenn wir momentan nicht alle Anfragen sofort bearbeiten können.
Wir sind Ihnen dankbar, wenn Sie uns primär per Mail kontaktieren, ausser in Notfällen.
Herzlichen Dank für Ihr Verständnis.
Ihre Schweizerische Vogelwarte Sempach
Informations sur le virus Corona
Selon les mesures de la Confédération contre le coronavirus, le centre de visite sera fermé jusqu’au 28 février 2021.
Notre station de soins fonctionne normalement. Nous réceptionnons les oiseaux tous les jours (lundi-dimanche) de 09.00 à 12.00 et de 13.30 à 17.00.
En raison des mesures Covid plus strictes, la plupart de nos employés télétravaillent depuis leur domicile. Nous ne sommes actuellement pas en mesure de traiter toutes les demandes immédiatement. Nous vous serions reconnaissants de bien vouloir nous contacter principalement par courrier électronique, sauf en cas d'urgence.
Nous vous remercions de votre compréhension.
Votre Station ornithologique suisse de Sempach
Informazioni virus corona
In conformità alle misure della Confederazione contro il coronavirus, il Centro visite è chiuso fino al 28 febbraio 2021.
Il nostro Centro di cura per uccelli continua a funzionare normalmente. Gli uccelli vengono presi in consegna giornalmente (lunedì-domenica) dalle 09.00 alle 12.00 e dalle 13.30 alle 17.00.
A causa delle misure più severe di Corona, la maggior parte dei nostri dipendenti si trova nei loro uffici di casa. Vi preghiamo di comprendere che non possiamo elaborare tutte le richieste di informazioni immediatamente. Vi saremmo grati se poteste contattarci principalmente via e-mail. In caso di emergenza, tuttavia, siamo naturalmente a vostra disposizione. Grazie per la vostra comprensione.
La vostra Stazione ornitologica svizzera
Informations concerning the corona virus
Due to the measures taken by the Swiss government against the coronavirus, the visitor centre will be closed until February 28th 2021.
Our bird care station continues to operate as usual. We accept birds daily (Monday-Sunday) from 09.00-12.00 and from 13.30-17.00.
Due to the stricter Corona measures, most of our employees are in their home offices. Please understand that we cannot process all inquiries immediately. We would be grateful if you could contact us primarily by e-mail. In case of emergency we are of course available for you.
Thank you for your understanding.
Your Swiss Ornithological Institute