warn: Weaning parameter estimation with approximate Bayesian...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/warn_s3.R

Description

warn estimates weaning parameters (i.e., weaning ages, enrichment factor, and nitrogen isotope ratio (d15N) of weaning food derived collagen) for a given skeletal population under the flamework of approximate Bayesian computation (ABC).

Usage

1
2
3
4
5
6
## Default S3 method:
warn(age, d15N, female.mean, female.sd = NA,
  fraction = "collagen",
  prior = c(0.5, 3, 3, 3, 1.9, 0.9, female.mean, 3, 0, 1),
  num.particle = 10000, form = "parabolic",
  tolerances = c(2.0, 1.0, 0.5, 0.25, 0.125, 0.0625, 0))

Arguments

age

a vector of estimated ages in year of the non-adult skeletons. Ages greater than 10 years are not allowed.

d15N

a vector of bone collagen d15N of non-adult skeletons. Other geochemical values (e.g., d18O, Sr/Ca, and Ba/Ca) can be used with this argument.

female.mean

the mean d15N of the adult females, single value.

female.sd

the one standard deviation of adult female d15Ns, an optional single value. Utilized later in plot.warn.

fraction

fraction of bone analyzed. The allowed values are collagen and mineral. The turnover rate specific to each fraction will be used.

prior

a vector of hyper parameter values for prior distributions of the weaning parameters and the individual error term. Mean and SD for t1 (age at the start of weaning), t2 (age at the end of weaning), enrichment of d15N, d15N of weaning food derived collagen, and sigma used in ABC-SMC, in sequence. The values are succeeded to mean and sd arguments of rnorm. The default is c(0.5, 3, 3, 3, 1.9, 0.9, female.mean, 3, 0, 1).

num.particle

number of particles in sequential Monte Carlo (SMC) sampling; defaults to 10000.

form

form of the model curve for the weaning process. The allowed values are "linear", "parabolic" (the default), "reverse", and "sigmoid".

tolerances

a vector of decreasing torelances used in the SMC sampling. The default is c(2.0, 1.0, 0.5, 0.25, 0.125, 0.0625, 0).

Details

The warn esimates the age at the start and end of weaning, enrichment of d15N through maternal to infant tissue, and d15N value of collagen synthesized entirely from weaning foods with their posterior probabilities. Other geochemical values that change with breastfeeding and weaning can also be analyzed (e.g., d18O, Sr/Ca, and Ba/Ca). Probabilities are estimated by SMC with partial rejection control, and the algorithm was derived from Sisson et al. (2007, 2009). The posterior probabilities are obtained as a result of kernel density estimation, a product of kde2d in MASS package for weaning ages, and density for enrichment and weaning foods. The model used to describe the change in d15N during weaning contains a new estimate of bone collagen turnover rates in non-adults, and is shown in Tsutaya and Yoneda (2013).

Value

warn returns an object of class "warn".
The function summary and plot are used to obtain and indicate a summary and figure of the results, respectively.
An object of class "warn" is a list containing at least the following components:

mde

the maximum density estimators and their marginal probabilities for the weaning parameters.

prob.2d.age

the joint probability for combination of the maximum density weaning ages.

dist.mde

the mean squared distance between the measured and modeled d15Ns of non-adults.

kde.age

two-dimensional kernel density estimates of the weaning ages. A product of kde2d in MASS package.

kde.enrich

kernel density estimates of the enrichment factor from mother to infant. A product of density.

kde.wnfood

kernel density estimates of the d15N of collagen synthesized entirely form weaning foods. A product of density.

posterior

a matrix of final particles in SMC sampling.

age

the non-adult ages used.

d15N

the measuerd d15Ns of non-adult bone collagen used.

female.mean

the mean d15N of adult females used.

female.sd

the one standard deviation of adult female d15Ns used.

fraction

the fraction of bone analyzed.

prior

a vector of the hyper parameter values for the prior distributions used.

particle

the number of particles used.

form

the form of the model curve used.

call

the matched call.


The band-width of kernel density estimation (i.e., h in kde2d and bw in density) is selected by SJ method, width.SJ in MASS, with "direct plug-in".

Author(s)

Takumi Tsutaya developed this model.

References

Sisson, S. A., Fan, Y., and Tanaka, M. M. (2007, 2009). Sequential Monte Carlo without likelihoods. Proc. Natl. Acad. Sci. 104, 1760–1765.

Tsutaya, T., and Yoneda, M. (2013). Quantitative reconstruction of weaning ages in archaeological human populations using bone collagen nitrogen isotope ratios and approximate Bayesian computation. PLoS ONE 8, e72327.

See Also

WARN, warnCI, warnProb, summary.warn, plot.warn

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Data from the Lerna population.
nonadult <- subset(lerna, lerna$age <= 10)
adult <- subset(lerna, lerna$age > 17)
female <- subset(adult, adult$sex == "f")

## Calculate maximum density estimators using ABC.
warn.lerna <- warn(
  age = nonadult$age,
  d15N = nonadult$d15N,
  female.mean = mean(female$d15N),
  num.particle = 500,
  female.sd = sd(female$d15N),
  prior = c(0.2, 0.2, 1.6, 0.2, 2.5, 0.2, 8.1, 0.2, 0, 0.7),
  tolerances = c(1.5, 0.7))

## Indicate summary.
summary(warn.lerna)

## Plot.
plot(warn.lerna)

## Plot with adult mean.
plot(warn.lerna,
  hline.adult = TRUE,
  adult.mean = mean(adult$d15N),
  adult.sd = sd(adult$d15N),
  is.female = FALSE)

Example output

Remains: 2 1 
Call:
warn.default(age = nonadult$age, d15N = nonadult$d15N, female.mean = mean(female$d15N), 
    female.sd = sd(female$d15N), prior = c(0.2, 0.2, 1.6, 0.2, 
        2.5, 0.2, 8.1, 0.2, 0, 0.7), num.particle = 500, tolerances = c(1.5, 
        0.7))

MDEs and marginal probabilities:
        mde probability
t1     0.20   0.2412912
t2     1.64   0.1710569
enrich 2.50   0.1023639
wnfood 8.10   0.1190483

Joint probability of the waening ages:
[1] 0.04822287

Mean squared distance under MDE parameters:
[1] 0.5214408

Number of non-adult individuals:
[1] 11

Number of particles:
[1] 500

WARN documentation built on Oct. 30, 2019, 9:57 a.m.