models_lnln {bioset}R Documentation

Model functions for data requiring ln-ln-transformation to fit a model.

Description

Use these functions to transform x and y using the natural logarithm and calculate a linear model, plot the model and use it to calculate x-values from the model data and y-values (inverse function).

Those function are intended to be used in set_calc_concentrations / sets_read to be applied to the calibrators (fit_lnln) and interpolate concentrations from the raw values (interpolate_lnln). Use plot_lnln to visually inspect goodness of fit.

Usage

fit_lnln(x, y)

plot_lnln(x, y)

interpolate_lnln(y, model)

Arguments

x

The x coordinates of the points.

y

The y coordinates of the points.

model

The line model.

Value

See Also

set_calc_concentrations, sets_read, models_linear

Examples

# generate data
x <- c(2.718282, 20.085537, 54.598150, 1096.633158)
# x is known for these values
y_known <- c(33.11545, 665.14163, 2980.95799, 268337.28652)
# we will calculate x for those:
y_unknown <- c(148.4132, 13359.7268, 59874.1417)

model <- fit_lnln(x = x, y = y_known)
model

plot_lnln(x = x, y = y_known)

interpolate_lnln(y = y_unknown, model)

rm(x, y_known, y_unknown, model)


[Package bioset version 0.2.3 Index]