Package 'LinCal'

Title: Static Univariate Frequentist and Bayesian Linear Calibration
Description: Estimate and confidence/credible intervals for an unknown regressor x0 given an observed y0.
Authors: Derick L. Rivers <[email protected]> and Edward L. Boone
Maintainer: Derick L. Rivers <[email protected]>
License: GPL-2
Version: 1.0.1
Built: 2024-10-31 20:43:28 UTC
Source: CRAN

Help Index


Static Univariate Frequentist and Bayesian Linear Calibration

Description

A collection of R functions for conducting linear statistical calibration.

Details

Package: LinCal
Type: Package
Version: 1.0.1
Date: 2022-04-27
License: GPL-2

Author(s)

Derick L. Rivers and Edward L. Boone

Maintainer: Derick L. Rivers <[email protected]>

References

Eisenhart, C. (1939). The interpretation of certain regression methods and their use in biological and industrial research. Annals of Mathematical Statistics. 10, 162-186.

Krutchkoff, R. G. (1967). Classical and Inverse Regression Methods of Calibration. Technometrics. 9, 425-439.

Hoadley, B. (1970). A Bayesian look at Inverse Linear Regression. Journal of the American Statistical Association. 65, 356-369.

Hunter, W., and Lamboy, W. (1981). A Bayesian Analysis of the Linear Calibration Problem. Technometrics. 3, 323-328.

Examples

library(LinCal)

data(wheat)

plot(wheat[,6],wheat[,2])

## Classical Approach
class.calib(wheat[,6],wheat[,2],0.05,105)

## Inverse Approach
inver.calib(wheat[,6],wheat[,2],0.05,105)

## Bayesian Inverse Approach
hoad.calib(wheat[,6],wheat[,2],0.05,105)

##Bayesian Classical Approach
huntlam.calib(wheat[,6],wheat[,2],0.05,105)

Classical Linear Calibration Function

Description

class.calib uses the classical frequentist approach to estimate an unknown X given observed vector y0 and calculates confidence interval estimates.

Usage

class.calib(x, y, alpha, y0)

Arguments

x

numerical vector of regressor measurments

y

numerical vector of observation measurements

alpha

the confidence interval to be calculated

y0

vector of observed calibration value

References

Eisenhart, C. (1939). The interpretation of certain regression methods and their use in biological and industrial research. Annals of Mathematical Statistics. 10, 162-186.

Examples

X <- c(1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10)
Y <- c(1.8,1.6,3.1,2.6,3.6,3.4,4.9,4.2,6.0,5.9,6.8,6.9,8.2,7.3,8.8,8.5,9.5,9.5,10.6,10.6)

class.calib(X,Y,0.05,6)

Bayesian Inverse Linear Calibration Function

Description

hoad.calib uses an inverse Bayesian approach to estimate an unknown X given observed vector y0 and calculates credible interval estimates.

Usage

hoad.calib(x, y, alpha, y0)

Arguments

x

numerical vector of regressor measurments

y

numerical vector of observation measurements

alpha

the confidence interval to be calculated

y0

vector of observed calibration value

References

Hoadley, B. (1970). A Bayesian look at Inverse Linear Regression. Journal of the American Statistical Association. 65, 356-369.

Examples

X <- c(1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10)
Y <- c(1.8,1.6,3.1,2.6,3.6,3.4,4.9,4.2,6.0,5.9,6.8,6.9,8.2,7.3,8.8,8.5,9.5,9.5,10.6,10.6)

hoad.calib(X,Y,0.05,6)

Bayesian Classical Linear Calibration Function

Description

huntlam.calib uses the classical Bayesian approach to estimate an unknown X given observed vector y0 and calculates credible interval estimates.

Usage

huntlam.calib(x, y, alpha, y0)

Arguments

x

numerical vector of regressor measurments

y

numerical vector of observation measurements

alpha

the confidence interval to be calculated

y0

vector of observed calibration value

References

Hunter, W., and Lamboy, W. (1981). A Bayesian Analysis of the Linear Calibration Problem. Technometrics. 3, 323-328.

Examples

X <- c(1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10)
Y <- c(1.8,1.6,3.1,2.6,3.6,3.4,4.9,4.2,6.0,5.9,6.8,6.9,8.2,7.3,8.8,8.5,9.5,9.5,10.6,10.6)

huntlam.calib(X,Y,0.05,6)

Inverse Linear Calibration Function

Description

inver.calib uses the inverse frequentist approach to estimate an unknown X given observed vector y0 and calculates confidence interval estimates.

Usage

inver.calib(x, y, alpha, y0)

Arguments

x

numerical vector of regressor measurments

y

numerical vector of observation measurements

alpha

the confidence interval to be calculated

y0

vector of observed calibration value

References

Krutchkoff, R. G. (1967). Classical and Inverse Regression Methods of Calibration. Technometrics. 9, 425-439.

Examples

X <- c(1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10)
Y <- c(1.8,1.6,3.1,2.6,3.6,3.4,4.9,4.2,6.0,5.9,6.8,6.9,8.2,7.3,8.8,8.5,9.5,9.5,10.6,10.6)

inver.calib(X,Y,0.05,6)

Percentage Water, Percentage Protein, and Infrared Reflectance Measurements of Hard Wheat

Description

A dataset containing 21 samples of hard wheat. The variables are as follows:

Usage

data("wheat")

Format

A data frame with 21 observations on the following 6 variables.

Y1

infrared reflectance vector

Y2

infrared reflectance vector

Y3

infrared reflectance vector

Y4

infrared reflectance vector

X1

percentage water vector

X2

percentage protein vector

Source

Brown, P. J. (1982). Multivariate calibration. Journal of the Royal Statistical Society B. 44, 287-321.

Examples

data(wheat)
## maybe str(wheat) ; plot(wheat) ...