residuals.bsm: Extract brokenstick model residuals

Description Usage Arguments Details Value See Also Examples

Description

Extract brokenstick model residuals

Usage

1
2
## S3 method for class 'bsm'
residuals(object, type = c("normal", "absolute"), newdata, ...)

Arguments

object

bsm object, typically result from brokenstick or optBrokenstick.

type

To choose in c('normal', 'absolute'). The second choice returning the absolute value of the first.

newdata

x and y data to used when interested in specific residual values (x in first column, y in second column).

...

Other arguments.

Details

Require eco.mem <= 4 if using newdata argument but requires eco.mem <= 2 otherwise (see bsmfit).

Value

Returns model residuals if newdata is omited. Returns residuals computed from newdata otherwise. In this case, returns NAs for values that do not belong to a stick .

See Also

brokenstick, optBrokenstick

Examples

1
2
3
4
data(exses)
dv <- tdrply(identity, 1:2, no = 100, obj= exses)[[1]]
bsm <- brokenstick(dv)
plot(residuals(bsm)) ; abline(v = bsm$pts, h = 0, col = "grey")

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