DemingFit: Deming Fit

DemingFitR Documentation

Deming Fit

Description

Fit a line to data so that the fit minimizes the least-squared distance of the data points from the line.

Usage

DemingFit(.x, .y, .sdx = 1, .sdy = 1)

Arguments

.x

A numeric vector of measurements from one source.

.y

A numeric vector of measurements from another source.

.sdx

A numeric vector specifying the standard measurement uncertainty for the first set of measurements. Default: 1

.sdy

Like .sdx but for the second set of measurements.

Details

See the detailed description in DemingFit.pdf

Value

c(a, b, rms) for a fit of the form y = a + b * x, or NULL if no fit is possible (e.g., too few points or zero correlation). The returned value rms is the normalized error, the rms of distances from the line if the two standard deviations .sdx and .sdy are the same or else the standard error applicable to the variable .x (or ratio*.y where ratio is .sdy/.sdx. This requires additional interpretation where the values .sdx or .sdy are variable.

Author(s)

William Cooper

Examples

DemingFit ((1:5+rnorm(5,0,0.5)), (1:5+rnorm(5,0,0.5)))
DemingFit (RAFdata$RTH1, RAFdata$RTH2)

NCAR/Ranadu documentation built on Jan. 27, 2023, 1:09 a.m.