FullCIs.XY: Confidence Intervals from OLSv to OLSh by DR and BLS

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

View source: R/FullCIs.XY.R

Description

Estimate the vertical and horizontal Ordinary least Square regressions, and several 'intermediate' Deming Regression (DR) and Bivariate Least Square (BLS), in a (X,Y) plot. The OLSv assumes no error on the X axis (λ=Infinity), while the OLSh assumes no error on the Y axis (λ=0). These two regressions are therefore 'extreme' regressions, while DR and BLS assume errors on both axes.

Usage

1
2
FullCIs.XY(data = NULL, xcol = 1, ycol = 2,
           conf.level = 0.95, npoints = 1000, nlambdas = 13)

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.

conf.level

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

npoints

an integer (at least 10) for the number of points to smooth the hyperbolic curves.

nlambdas

an integer for the number of intermediate DR and BLS regressions (between the OLSv and OLSh).

Details

The data argument is mandatory. This function is especially useful for unreplicated data with unknown λ (the ratio of the measurement error variances), as it calculates all the potential solutions from OLSv to OLSh. The different estimated regression lines are provided with the different confidence intervals.

Value

A CIs.XY class object, a list including the following elements:

Data.means

a table with the X and Y data (means of the replicated data if replicated).

Ellipses.CB

an array of dimension [npoints, 2 (intercept and slope), nlambdas + 2] with the coordinates of all the joint confidence intervals (confidence region, ellipses) from OLSv to OLSh.

Slopes

a table (nlambdas + 2 rows) with all the slopes estimates from OLSv to OLSh including nlambdas intermediate values, the exact and approximate confidence intervals and pvalue (slope = 1).

Intercepts

a table (nlambdas + 2 rows) with all the intercepts estimates from OLSv to OLSh including nlambdas intermediate values, the approximate confidence intervals and pvalue (intercept = 0).

Joints

a table (nlambdas + 2 rows) with all the pvalues of the joint hypothesis (slope = 1 and intercept = 0) from OLSv to OLSh including intermediate nlambdas values.

Hyperbolic.intervals

an array of dimension [npoints, 6 (X values, Y predictions, confidence interval and confidence bands),nlambdas+2] with the hyperbolic confidence intervals and confidence bands from OLSv to OLSh including nlambdas intermediate values.

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.
Francq BG, Govaerts BB. Hyperbolic confidence bands of errors-in-variables regression lines applied to method comparison studies. Journal de la Societe Francaise de Statistique 2014; 155(1):23-45.

See Also

FullCIs.MD, BLS

Examples

1
2
3

Example output

Loading required package: ellipse

Attaching package: 'ellipse'

The following object is masked from 'package:graphics':

    pairs

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