Description Usage Arguments Details Value Author(s) See Also Examples
Runs an MCMC on stable isotope data from certain organisms to determine their dietary habits.
1 |
data |
A matrix with each food source as a seperate row and each isotope as a seperate column. |
sources |
A matrix containing the mean and standard deviations of the fractionated correction values for each of the isotopes. Also allows corrections = 0 for pre-corrected data. |
corrections |
A matrix containing the mean and standard deviations of the fractional correction values for each of the isotopes. Also allows corrections = 0 for pre-corrected data. |
concdep |
A matrix containing the mean and standard deviations of the concentration dependence values for each of the isotopes. Also allows concdep = 0 for data with no required concentration dependence. Note that version 4.0 does not use the standard deviations. |
iterations |
The number of iterations to run. |
burnin |
The size of the burnin |
howmany |
How often to report the number of iterations. |
thinby |
The amount of thinning of the iterations. |
prior |
The dirichlet distribution prior parameters, the default is rep(1,numsources). New parameters
can be estimated via the function |
siardata |
A list containing some or all of the following parts: targets, sources, corrections,
PATH, TITLE, numgroups, numdata, numsources, numiso, SHOULDRUN, GRAPHSONLY, EXIT, and output. For more details
of these inputs see the |
The model assumes that each target value comes from a Gaussian distribution with an unknown mean and standard deviation. The structure of the mean is a weighted combination of the food sources' isotopic values. The weights are made up dietary proportions (which are given a Dirichlet prior distribution) and the concentration depdendencies given for the different food sources. The standard deviation is divided up between the uncertainty around the fractionation corrections (if corrections are given) and the natural variability between target individuals within a defined group (or between all individuals if no grouping structure is specified). The default iterations numbers work well for the demo data sets, but advanced users will want to adjust them to suit their analysis.
A parameter matrix consisting of (iterations-burnin)/thinby rows with numgroups*(numsources+numiso) columns, where numsources is the number of food sources, numiso is the number of isotopes, and numgroups is the number of groups. The parameter matrix is structured so that, for each group, the first columns are those of the proportions of each food source eaten, the next columns are the standard deviations for each isotope. This format repeats across rows to each group. The parameters may then subsequently be used for plotting, convergence checks, summaries, etc, etc.
Andrew Parnell
1 2 | # Should take around 10 seconds to run
#out <- siarmcmcdirichletv4(geese1demo,sourcesdemo,correctionsdemo,concdepdemo)
|
Loading required package: hdrcde
Loading required package: mvtnorm
hdrcde 3.1 loaded
Loading required package: coda
Loading required package: MASS
Loading required package: bayesm
Loading required package: mnormt
Loading required package: spatstat
Loading required package: nlme
Loading required package: rpart
spatstat 1.52-1 (nickname: 'Apophenia')
For an introduction to spatstat, type 'beginner'
Note: spatstat version 1.52-1 is out of date by more than 4 months; we recommend upgrading to the latest version.
Attaching package: 'spatstat'
The following object is masked from 'package:MASS':
area
Attaching package: 'siar'
The following object is masked from 'package:spatstat':
convexhull
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.