get.ref.line: Isotonic/Montone Regression Best Fit

View source: R/Francis_bomb_functions.R

get.ref.lineR Documentation

Isotonic/Montone Regression Best Fit

Description

get.ref.line generates a list containing isoreg function model fits to x and y data. The function 1st checks to see if multiple y values are present for a given x. If there are, it determines the mean y for each variable of x" before using the function isoreg to compute the isotonic (monotonely increasing nonparametric) least squares regression which is piecewise constant that bests fits the data.

Usage

get.ref.line(x, y)

Arguments

x

numeric vector representing the x-coordinates of the regression points.

y

numeric vector representing the y-coordinates of the regression points.

Value

Object of class list containing the results of the link{isoreg} function. The list will be of length two:

x

original (constructed) abscissa values x, sorted in ascending order

y

fitted values corresponding to ordered x values

See Also

isoreg

Other Bomb Radiocarbon Analyses: bias.plot.BR(), calc.bias(), calc.h(), closest.pt(), get.h.from.bias(), get.nearest(), sim.hdist()

Examples

set.seed(1234)
x <- 1:100
y <- x + rnorm(100, 0, 5)
get.ref.line(x, y)

ballengerj/FishyR documentation built on June 17, 2022, 10:33 p.m.