ModelParameters: Loads model paramters

Description Usage Arguments Details Value Author(s) Examples

Description

Sets the parameters for the model and the MCMC. Also has the option to plot out the inverse gamma prior on sigma.

Usage

1
ModelParameters(sigma_expectation = 0.02, plotsigma = T, tau = "DEFAULT", Delta = 1, minburnin = 100, maxburnin = 1000, chains = 5, Samples = 10000)

Arguments

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 TRUE plots the inverse gamma prior on sigma.

tau

Set as "DEFAULT" meaning that the paramter tau (the prior on source emergence) is calculated from the area of the data.

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.

Details

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.

Value

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.

Author(s)

M.D.Stevenson

Examples

 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)

stevenlecomber/Rgeoprofile-1.1.0 documentation built on May 30, 2019, 4:46 p.m.