Learn R Programming

Luminescence (version 0.1.7)

plot_GrowthCurve: Fit and plot a growth curve for luminescence data (Lx/Tx against dose)

Description

A dose response curve for luminescence measurments using a regenerative protocol is produced.

Usage

plot_GrowthCurve(sample,main="Growth Curve",mtext="",
                 fit.method="EXP",
                 fit.weights=TRUE,
                 fit.includingRepeatedRegPoints=TRUE,
                 fit.NumberRegPoints,
                 fit.NumberRegPointsReal,
                 NumberIterations.MC=100,xlab="s",
                 output.plot=TRUE,output.plotExtended=TRUE,
                 cex.global=1)

Arguments

sample
data.frame (required): data.frame(x=dose,y=LxTx,z=LxTx_Error, y1=TnTx). The column for the test dose response is optional.
main
character (with default): header of the plot.
mtext
character (optional): additional text on the right side of the plot.
fit.method
character (with default): functions used for fitting. Possible options are: LIN, EXP, EXP OR LIN,EXP+LIN or EXP+EXP
fit.weights
logical (with default): option wether the fitting is done with or without weights. See details.
fit.includingRepeatedRegPoints
logical (with default): includes repeated points for fitting (TRUE/FALSE)
fit.NumberRegPoints
integer (optional): set number of regeneration points manually. By default the number of all(!) regeneration points is grepped automatically.
fit.NumberRegPointsReal
integer (optional): if the number of regeneration points is provided manually the value of the real regenerations points = all points - repeated points - reg 0 have to be inserted.
NumberIterations.MC
integer (with default): number of Monte Carlo simulation runs for the error estimation. See details.
xlab
character (with default): unit for the x-axis labeling. Possible values are "Gy" and "s".
output.plot
logical (with default): plot output (TRUE/FASLE).
output.plotExtended
logical (with default): If TRUE 3-plots on one plot area are provided: (1) growth curve, (2) histogram from error Monte Carlo simulation and (3) a test dose response plot. If FALSE just th
cex.global
numeric (with default): global scale factor.

Value

  • lista list containing the De (De, De Error and D0 value) and Fit object nls object for EXP, EXP+LIN and EXP+EXP. In case of a linear fit EXP OR LIN a lm object is returned.
  • PlotA plot of the growth curve. A histogram for the error calculation and a test dose response plot.

Details

fitting methods For all options (except the LIN in the option the EXP OR LIN) nls function with the port algorithm is used.

LIN: fit a linear function to the data using lm: $$y = mx+n$$ EXP: try to fit a function of the form $$y = a*(1-exp(-(x+c)/b))$$ Parameter b and c are approximated by a linear fit using lm. EXP OR LIN: works for some cases where a EXP fit failes. If the EXP fit failes a LIN fit is done instead. EXP+LIN: try to fit a exponential plus linear function of the form:

$$y = a*(1-exp(-(x+c)/b)+(g*x))$$ The De is calculated by iteration. Note: In the context of luminescence dating this function has no physical meaning. Therefore no D0 value is returned. EXP+EXP: try to fit a double exponential function of the form $$y = (a1*(1-exp(-(x)/b1)))+(a2*(1-exp(-(x)/b2)))$$ This fitting is highly resilent against wrong start parameters and should be further improved. fit weighting (suggest by Michael Dietze and Margret Fuchs) If the option fit.weights=TRUE weights are calculated using provided signal errors (Lx/Tx error) using the equation:

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

error estmation using Monte Carlo simulation Error estimation is done using a Monte Carlo (MC) simulation approach. A set of input values is constructed by randomly drawing curve data from a normal distribution. The normal distribution is defined by the input values (mean=value, sd=value.error). Then a growth curve fit is tried for each dataset which results in new distribution of values. The sd of this distribution is the error of the De. With increasing iterations the error value is becoming more stable. Note: It may take some calculation time with increaing MC runs especially for the composed functions (EXP+LIN and EXP+EXP).

Every error estimation is done with the function of the chosen fitting method.

References

Duller, G.A.T., 2007. Assessing the error on equivalent dose estimates derived from single aliquot regenerative dose measurements. Ancient TL 25, 15-24.

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 1-71, doi: 10.1016/j.quageo.2012.04.020

See Also

hist, plot, nls, lm

Examples

Run this code
##(1) plot growth curve for a dummy data.set
data(ExampleData.LxTxData)
plot_GrowthCurve(LxTxData)
                                   
                                   
##==================================================##
##(2) plot the growth curve only

##pdf(file="~/Desktop/Growth_Curve_Dummy.pdf",paper="special")
data(ExampleData.LxTxData)
plot_GrowthCurve(LxTxData)
##dev.off()                                   
                                   
##==================================================##
##(3) plot growth curve with pdf output on desktop (path works for Mac)

##pdf(file="~/Desktop/Growth_Curve_Dummy.pdf",paper="special")
data(ExampleData.LxTxData)
plot_GrowthCurve(LxTxData)
##dev.off()

Run the code above in your browser using DataLab