ortresiduals.OEFPIL: Orthogonal residuals from an OEFPIL object

Description Usage Arguments Value Note See Also Examples

View source: R/ortresiduals.OEFPIL.R

Description

Function for calculating orthogonal residuals of an "OEFPIL" object (i.e. the shortest Euclidean distance between data points and the estimated function from OEFPIL).

Usage

1
ortresiduals.OEFPIL(object, min.c)

Arguments

object

an object of class "OEFPIL" (a result of a call to OEFPIL).

min.c

a numeric value, for defining minimization interval for the optimize function (if not defined, default value 0.05 * range(x) is used). Must be positive.

Value

Returns an object of type list containing following components

x.ores

a numerical vector of x coordinates of points, where the minimal distance is realized.

o.resid

a numerical vector of orthogonal residuals (minimal Euclidean distances between data points and estimated function).

SSort

the orthogonal sum of squares.

Note

The value min.c should not be too small. In that case the minimization interval is too narrow and the result can be misleading (see Example 3).

See Also

OEFPIL

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
##-- Continuing the coef.OEFPIL(.) example:

##Example 1 Use ortresiduals.OEFPIL function on the OEFPIL object, with specified value 'min.c'
ortresiduals.OEFPIL(st1,5)

##Example 2 Use ortresiduals.OEFPIL function without value 'min.c' (defaut.value = 0.05 * range(x))
ortresiduals.OEFPIL(st1)

##Example 3 Choice of too narrow interval. Misleading result!
ortresiduals.OEFPIL(st1,0.5)

OEFPIL documentation built on Nov. 4, 2021, 5:07 p.m.