Description Usage Arguments Details Value Author(s) Examples
Sets the parameters for the model and the MCMC. Also has the option to plot out the inverse gamma prior on sigma.
1 | ModelParameters(sigma_expectation = 0.02, plotsigma = T, tau = "DEFAULT", Delta = 1, minburnin = 100, maxburnin = 1000, chains = 5, Samples = 10000)
|
sigma_expectation |
The expecatation of the inverse gamma prior on the paramter sigma. What you expect to be a reasonable value for sigma. If possible use an informative value for this prior. Units in decimal degrees. |
plotsigma |
If |
tau |
Set as |
Delta |
A parameter in the inverse gamma prior on sigma, defaults to 1. Must be larger than 0.5. |
minburnin |
The minimum burn-in for the MCMC before it can begin sampling, defaults to 100. It is recommended to be 100-500. |
maxburnin |
The maximum burn-in for the MCMC before it can begin sampling, defaults to 1000. It is recommended to be 1000-5000. |
chains |
Number of chains run in the MCMC, defaults to 5. Reccomend 5-10. |
Samples |
Number of sample to be taken from the MCMC, this will depend upon convergence and autocorrelation. Defaults to 10,000, reccomend 10,000 to 100,000. |
This function sets the important model parameters as well as the values to be used by the MCMC. The most important value is the expectation on sigma. This would ideally be set as an informative prior on sigma, using knowledge of the organism in questions dispersal and movement. The units of this value are in lattitude decimal degrees. Use plotprior=T
to examine the prior on the dispersal paramter sigma to make sure it is sensible.
sigma_expectation |
The expecatation of the inverse gamma prior on the paramter sigma, units in decimal degrees |
tau |
Set as "DEFAULT" |
minburnin |
The minimum burn-in for the MCMC before it can begin sampling, defaults to 100 |
maxburnin |
The maximum burn-in for the MCMC before it can begin sampling, defaults to 1000 |
chains |
Number of chains run in the MCMC, defaults to 5 |
Samples |
Number of sample to be taken from the MCMC, defaults to 10,000 |
Delta |
A parameter in the inverse gamma prior on sigma, defaults to 1 |
Beta |
Other parameter of inverge gamma on sigma, calculated from Delta and the sigma_expecatation |
sdvec |
A vector standard deviation values from the inverse gamma prior on sigma |
sdprior |
The standdard deviation of the prior value of sigma used to generate the figure of the prior distribution of sigma. |
M.D.Stevenson
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
#### Load in data first
LoadData(data=mydata)
### Set up default model parameters and examine the prior
ModelParameters()
### Change the parameter sigma to 0.05 and Delta to 0.7
ModelParameters(sigma_expectation = 0.05, Delta = 0.7)
### Decrease burn-in and number of samples taken (to speed up the running of the MCMC)
ModelParameters(minburnin = 100, maxburnin = 1000, Samples = 10000)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.