models_lnln: Model functions for data requiring ln-ln-transformation to...

Description Usage Arguments Value See Also Examples

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

1
2
3
4
5
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# 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)

bioset documentation built on May 2, 2019, 4 p.m.