DR: Deming Regression

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/DR.R

Description

Estimate the Deming Regression (DR) with unreplicated or replicated data.

Usage

1
DR(data = NULL, xcol = 1, ycol = 2, ratio.var = NULL, conf.level = 0.95)

Arguments

data

a data set (data frame or matrix).

xcol

a numeric vector to specify the X column(s) or a character vector with the column names.

ycol

a numeric vector to specify the Y column(s) or a character vector with the column names.

ratio.var

a numeric value for λ the ratio of the measurement error variances (Y over X) if known. Otherwise, it may be estimated with replicated data.

conf.level

a numeric value for the confidence level (expressed between 0 and 1).

Details

The BLS regression is more general and includes the Deming Regression. The BLS regression provides more results and should, therefore, be used instead of DR.

Value

A list including the following elements:

Ellipse.DR

a two columns matrix with the coordinates of the joint confidence interval (confidence region, ellipse) for the parameters (β, α).

Estimate.DR

a table (data frame) with the estimates of the intercept and the slope, standard error, confidence interval and pvalue (null hypothesis: slope = 1, intercept = 0). The exact confidence interval for the slope is also given.

Author(s)

Bernard G FRANCQ

References

Francq BG, Govaerts BB. Measurement methods comparison with errors-in-variables regressions. From horizontal to vertical OLS regression, review and new perspectives. Chemometrics and Intelligent Laboratory Systems 2014; 134:123-139.
Tan CY, Iglewicz B. Measurement-methods comparisons and linear statistical relationship. Technometrics, 1999; 41(3):192-201.

See Also

BLS

Examples

1
2
3
4
5
6
library(BivRegBLS)
data(SBP)
res.DR=DR(data=SBP,xcol=c("J1","J2","J3"),ycol=8:10)
res.DR$Estimate.DR
data(Aromatics)
res.DR=DR(data=Aromatics,xcol=3,ycol=4,ratio.var=2)

Example output

Loading required package: ellipse

Attaching package:ellipseThe following object is masked frompackage:graphics:

    pairs

                           H0          Estimate       Lower 95%CI
Intercept (approximate)     0  21.2303257159297  2.66212144060081
Slope (exact)               1 0.955962539396039  0.81451528223186
Slope (approximate)         1 0.955962539396039 0.810609426336659
Joint                   (0,1)                                    
                             Upper 95%CI             pvalue
Intercept (approximate) 39.7985299912586 0.0255398407713474
Slope (exact)           1.11075685579696                   
Slope (approximate)     1.10131565245542  0.548422499912307
Joint                                                     0

BivRegBLS documentation built on Oct. 11, 2019, 1:05 a.m.