Learn R Programming

OEFPIL (version 0.1.1)

ortresiduals.OEFPIL: Orthogonal residuals from an OEFPIL object

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

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.

See Also

OEFPIL

Examples

Run this code
# NOT RUN {
##-- 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)
# }

Run the code above in your browser using DataLab