fit_ggcr: fit_ggcr

Description Usage Arguments Value Author(s) References

Description

This function fits a Gamma-Gompertz model to capture-recapture data using data cloning. To improve parameter estimates clones of the data are used. To speed up convergence at each new number of clones the means and precisions of the priors supposed normally distributed (the last parameter in alphabetical order is logged) are updated. Only for the first number of clones the means must be put in vector initmeans, and a common precision is set in initprec. The specifics of the Markov chains along with the different series of clones are defined

Usage

1
2
fit_ggcr(mydata, clo = c(1, 10, 50, 100), nu = 1000, ni = 5000, nt = 5,
  nc = 3, initmeans = c(0.15, 0.5, 4.9, 1.4, -0.4), initprec = 1000)

Arguments

mydata

a matrix of 1's and 2's for detections and non-detections (the first 1 being the birth year)

clo

vector of numbers of clones in each lot: increasing order is advisable and start with 1 clone is not compulsory. Default is c(1,10,50,100)

nu

number of updates in the Markov chains. Default is 1000.

ni

number of iterations in the Markov chains. Default is 5000.

nt

number of thinning (see Link and Eaton 2012). Default is 5.

nc

number of Markov chains. Default is 3.

initmeans

for the first lot of clones, vector of the normally distributed means of the parameter priors, the last parameter being logged. Default is c(0.15,0.5,4.9,1.4,-0.4).

initprec

a common precision of the prior normal distributions is set for all the parameters. Default is 1000.

Value

This function returns values from the posterior distribution of the parameters of a Gamma-Gompertz model.

Author(s)

Gilbert Marzolin, Olivier Gimenez

References

Link, W. A. and Eaton, M. J. (2012), On thinning of chains in MCMC. Methods in Ecology and Evolution, 3: 112–115. doi:10.1111/j.2041-210X.2011.00131.x


oliviergimenez/GammaGompertzCR documentation built on May 14, 2019, 6:15 p.m.