orthoreg: Linear univariate orthogonal regression

Description Usage Arguments Details Value Examples

View source: R/CBregression.R

Description

Fit a line to two-dimensional data points by minimizing orthogonal ditances between line and points.

Usage

1
orthoreg(x,y)

Arguments

x,y

Numeric vectors of equal length.

Details

The function orthoreg performs an orthogonal linear regression. The model equation is y=a*x+b

Value

A vector with the estimates for a and b.

Examples

1
2
3
vx=c(1,2,3,4)
vy=c(3,4,4,5)
orthoreg(vx,vy)

ROldenburg/CBregress documentation built on Jan. 5, 2021, 12:12 a.m.