fit_DRC: Fit and plot a dose response curve for ESR data (ESR...

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

View source: R/fit_DRC.R

Description

A dose response curve is produced for Electron Spin Resonance measurements using an additive dose protocol.

Usage

1
2
3
fit_DRC(input.data, model = "EXP", fit.weights = "equal",
  algorithm = "LM", mean.natural = FALSE, bootstrap = FALSE,
  bootstrap.replicates = 999, plot = FALSE, ...)

Arguments

input.data

data.frame (required): data frame with two columns for x=Dose, y=ESR.intensity. Optional: a third column containing individual ESR intensity errors can be provided.

model

character (with default): Currently implemented models: single-saturating exponential ("EXP"), linear ("LIN").

fit.weights

logical (with default): option whether the fitting is done with equal weights ('equal') or weights proportional to intensity ('prop'). If individual ESR intensity errors are provided, these can be used as weights by using 'error'.

algorithm

character (with default): specify the applied algorithm used when fitting non-linear models. If 'port' the 'nl2sol' algorithm from the Port library is used. The default ('LM') uses the implementation of the Levenberg-Marquardt algorithm from the 'minpack.lm' package.

mean.natural

logical (with default): If there are repeated measurements of the natural signal should the mean amplitude be used for fitting?

bootstrap

logical (with default): generate replicates of the input data for a nonparametric bootstrap.

bootstrap.replicates

numeric (with default): amount of bootstrap replicates.

plot

logical (with default): plot output (TRUE/FALSE).

...

further arguments

Details

Fitting methods

For fitting of the dose response curve the nls function with the port algorithm is used. A single saturating exponential in the form of

y = a*(1-exp(-(x+c)/b))

is fitted to the data. Parameters b and c are approximated by a linear fit using lm.

Fit weighting

If 'equal' all datapoints are weighted equally. For 'prop' the datapoints are weighted proportionally by their respective ESR intensity:

fit.weights = 1/intensity/(sum(1/intensity))

If individual errors on ESR intensity are available, choosing 'error' enables weighting in the form of:

fit.weights = 1/error/(sum(1/error))



Bootstrap

If bootstrap = TRUE the function generates bootstrap.replicates replicates of the input data for nonparametric ordinary bootstrapping (resampling with replacement). For each bootstrap sample a dose response curve is constructed by fitting the chosen function and the equivalent dose is calculated. The distribution of bootstrapping results is shown in a histogram, while a qqnorm plot is generated to give indications for (non-)normal distribution of the data.

Value

Returns terminal output and a plot. In addition, a list is returned containing the following elements:

output

data frame containing the De (De, De Error, D01 value).

fit

nls object containing the fit parameters

Note

This function is largely derived from the plot_GrowthCurve function of the 'Luminescence' package by Kreutzer et al. (2012).

Fitting methods
Currently, only fitting of a single saturating exponential is supported. Fitting of two exponentials or an exponential with a linear term may be implemented in a future release.

Bootstrap

While a higher number of replicates (bootstrap samples) is desirable, it is also increasingly computationally intensive.

Author(s)

Christoph Burow, University of Cologne (Germany) Who wrote it

References

Efron, B. & Tibshirani, R., 1993. An Introduction to the Bootstrap. Chapman & Hall.

Davison, A.C. & Hinkley, D.V., 1997. Bootstrap Methods and Their Application. Cambridge University Press.

Galbraith, R.F. & Roberts, R.G., 2012. Statistical aspects of equivalent dose and error calculation and display in OSL dating: An overview and some recommendations. Quaternary Geochronology, 11, pp. 1-27.

Kreutzer, S., Schmidt, C., Fuchs, M.C., Dietze, M., Fischer, M., Fuchs, M., 2012. Introducing an R package for luminescence dating analysis. Ancient TL, 30 (1), pp 1-8.

See Also

plot, nls, lm, link{boot}

Examples

1
2
3
4
5
##load example data
data(ExampleData.De, envir = environment())

##plot ESR sprectrum and peaks
fit_DRC(input.data = ExampleData.De, fit.weights = 'prop')

tzerk/ESR documentation built on May 20, 2019, 1:12 p.m.