which.stick: To which brokenstick segment a point belongs to ?

Description Usage Arguments See Also Examples

Description

Given a brokenstick model and a set of points, the function determines on which stick the points are located.

Usage

1
which.stick(object, pts, type = c("x", "i"))

Arguments

object

Object of class inheriting from "bsm".

pts

The set of the points to match aginst sticks.

type

The type of values provided in pts. To choose in c('x', 'i') where 'x' stands for x values and 'i' stands for the index of values.

See Also

predict.bsm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(exses)
dv <- tdrply(identity, 1:2, no = 100, obj = exses)[[1]]
bsm <- brokenstick(dv) 
(pts <- sample(1:nrow(dv), 5))
which.stick(bsm, pts, type = 'i')
which.stick(bsm, dv[pts, 1], type = 'x')

## Not run: 
# For the actual points of the model the result does not matter so much
# since both of previous and next segment are valid for prediction.
which.stick(bsm, bsm$pts, 'i')

## End(Not run)

SESman/rbl documentation built on May 9, 2019, 11:10 a.m.