Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

warnOptim

Optimize the weaning parameters


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

## 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

Examples

## 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

Weaning Age Reconstruction with Nitrogen Isotope Analysis

v1.2-4
GPL (>= 3)
Authors
Takumi Tsutaya
Initial release
2019-10-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.