OLSh: Horizontal Ordinary Least Square regression

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

View source: R/OLSh.R

Description

Fit a linear ordinary least square regression by minimising the residuals in a horizontal direction.

Usage

1
OLSh(data = NULL, xcol = 1, ycol = 2, conf.level = 0.95)

Arguments

data

a data set (data frame or matrix).

xcol

a numeric vector to specify the X columns or a character vector with the column names.

ycol

a numeric vector to specify the Y columns or a character vector with the column names.

conf.level

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

Details

The data argument is mandatory while other arugments are optional.

Value

A list including the following elements:

Ellipse.OLSh

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

Estimate.OLSh

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).

Note

The default value for xcol (ycol) is 1 (2) for the 1st (2nd) column. The confidence region for the OLSh parameters is 'distorted' as it results from the OLSv confidence region (ellipse).

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

OLSv

Examples

1
2
res.OLSh=OLSh(matrix(nrow=10,ncol=2,c((1:10)+rnorm(10),1:10)))
res.OLSh$Estimate.OLSh

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