warnOptim: Optimize the weaning parameters

Description Usage Arguments Details Value See Also Examples

View source: R/warn_s3.R

Description

warnOptim optimzes the weaning parameters for a given skeletal population. This function can be preliminaly used in order to set efficient priors of the weaning parameters.

Usage

1
2
3
4
5
## Default S3 method:
warnOptim(age, d15N, female.mean,
  fraction = "collagen",
  par.initial = c(0.5, 3, 1.9, female.mean), 
  form = "parabolic", ...)

Arguments

age

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

d15N

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

fraction

fraction of bone analyzed. The allowed values are collagen and mineral.

par.initial

a vector of the initial parameter values for optimizetion: t1, t2, enrichment, and weaning food, in sequence. The values are succeeded to the par arguments of optim.

female.mean

the mean d15N (or other geochemical value) of adult females, single value.

form

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

...

additional argunemts passed to optim.

Details

The warnOptim calculates the weaning parameters (i.e., weaning ages, enrichment factor, and d15N of bone collagen synthesized entirely from the weaning foods), which minimize the mean squared distance between the measured and modeled d15Ns using optim. Result of this function is just a rough indication and initial parameter dependent, and can be preliminaly used in order to set efficient priors of the weaning parameters.

Value

warnOptim directly returns a result list of optim.

See Also

WARN, warn, warnCI, warnProb

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Data from the Lerna population.
nonadult <- subset(lerna, lerna$age <= 10)
adult <- subset(lerna, lerna$age > 17)
female <- subset(adult, adult$sex == "f")

## Simple optimization without probability.
(opt.lerna <- warnOptim(
  age = nonadult$age,
  d15N = nonadult$d15N,
  female.mean = mean(female$d15N),
  control = list(maxit = 10000, ndeps = 1e-2, reltol = 1e-7)))

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