Find the x with the closest y
Usage
NLSstClosestX(xy, yval)
Arguments
xy
|
a sortedXyData object
|
yval
|
the numeric value on the y scale to get close to
|
Description
This function is used to determine the x
value in a
sortedXyData
object that corresponds to the y
value that
is closest to yval
. The function is mostly used within the
initial
functions for a self-starting nonlinear regression
models, which are in the selfStart
class.Value
A single numeric value which is one of the values of x
in the
xy
object.Author(s)
Jose Pinheiro and Douglas BatesExamples
library( lme )
data( DNase )
DNase.2 <- DNase[ DNase$Run == "2", ]
DN.srt <- sortedXyData( expression(log(conc)), expression(density), DNase.2 )
NLSstClosestX( DN.srt, 1.0 )