predict.bsm: Brokenstick model predictions

Description Usage Arguments Details See Also Examples

Description

Brokenstick model predictions

Usage

1
2
## S3 method for class 'bsm'
predict(object, newdata, ...)

Arguments

object

Object of class inheriting from "bsm".

newdata

An optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used.

...

other arguments.

Details

Require eco.mem <= 4 (see bsmfit). When using newdata argument, the function returns NAs for values that do not belong to a stick.

See Also

brokenstick, optBrokenstick, which.stick

Examples

1
2
3
4
5
6
7
data(exses)
dv <- tdrply(identity, 1:2, no = 100, obj = exses)[[1]]
bsm <- brokenstick(dv) 
plot(bsm, data = TRUE, enumerate = TRUE)

ypred <- predict(bsm, newdata = xpred <- sample(dv$time, 10))
points(xpred, ypred, col = 3, pch = 19)

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