stepbound {stepR} | R Documentation |
Jump estimation under restrictions
Description
Computes piecewise constant maximum likelihood estimators with minimal number of jumps under given restrictions on subintervals.
Deprecation warning: This function is a help function for smuceR
and jsmurf
and may be removed when these function will be removed.
Usage
stepbound(y, bounds, ...)
## Default S3 method:
stepbound(y, bounds, x = 1:length(y), x0 = 2 * x[1] - x[2],
max.cand = NULL, family = c("gauss", "gaussvar", "poisson", "binomial", "gaussKern"),
param = NULL, weights = rep(1, length(y)), refit = y,
jumpint = confband, confband = FALSE, ...)
## S3 method for class 'stepcand'
stepbound(y, bounds, refit = TRUE, ...)
Arguments
y |
a vector of numerical observations |
bounds |
bounds on the value allowed on intervals; typically computed with |
x |
a numeric vector of the same length as |
x0 |
a single numeric giving the last unobserved sample point directly before sampling started |
max.cand , weights |
see |
family , param |
specifies distribution of data, see family |
refit |
|
jumpint |
|
confband |
|
... |
arguments to be passed to generic methods |
Value
An object of class stepfit
that contains the fit; if jumpint == TRUE
function jumpint
allows to extract the confidence interval for the jumps, if confband == TRUE
function confband
allows to extract the confidence band.
References
Frick, K., Munk, A., and Sieling, H. (2014) Multiscale change-point inference. With discussion and rejoinder by the authors. Journal of the Royal Statistical Society, Series B 76(3), 495–580.
Hotz, T., Schütte, O., Sieling, H., Polupanow, T., Diederichsen, U., Steinem, C., and Munk, A. (2013) Idealizing ion channel recordings by a jump segmentation multiresolution filter. IEEE Transactions on NanoBioscience 12(4), 376–386.
See Also
bounds
, smuceR
, jsmurf
, stepsel
, stepfit
, jumpint
, confband
Examples
# simulate poisson data with two levels
y <- rpois(100, c(rep(1, 50), rep(4, 50)))
# compute bounds
b <- bounds(y, penalty="len", family="poisson", q=4)
# fit step function to bounds
sb <- stepbound(y, b, family="poisson", confband=TRUE)
plot(y)
lines(sb)
# plot confidence intervals for jumps on axis
points(jumpint(sb), col="blue")
# confidence band
lines(confband(sb), lty=2, col="blue")