Learn R Programming

BivRegBLS (version 1.1.1)

OLSh: Horizontal Ordinary Least Square regression

Description

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

Usage

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

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

Details

The data argument is mandatory while other arugments are optional.

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

Run this code
# NOT RUN {
res.OLSh=OLSh(matrix(nrow=10,ncol=2,c((1:10)+rnorm(10),1:10)))
res.OLSh$Estimate.OLSh
# }

Run the code above in your browser using DataLab