Learn R Programming

stepR (version 1.0-1)

bounds: Bounds based on MRC

Description

Computes two-sided bounds for a collection of intervals based on a multiresolution criterion (MRC).

Usage

bounds(y, type = "MRC", ...)
bounds.MRC(y, q, alpha = 0.05, r = ceiling(50 / min(alpha, 1 - alpha)),
  lengths = if(family == "gaussKern")
    2^(floor(log2(length(y))):ceiling(log2(length(param$kern)))) else
    2^(floor(log2(length(y))):0), penalty = c("none", "len", "var", "sqrt"),
  name = if(family == "gaussKern") ".MRC.ktable" else ".MRC.table", pos = .GlobalEnv,
  family = c("gauss", "gaussvar", "poisson", "binomial","gaussKern"), param = NULL,
  subset, max.iter = 1e2, eps = 1e-3)
## S3 method for class 'bounds':
[(x, subset)

Arguments

y
a numeric vector containing the serial data
type
so far only bounds of type "MRC" are implemented
...
further arguments to be passed on to bounds.MRC
q
quantile of the MRC; if specified, alpha and r will be ignored
alpha
level of significance
r
number of simulations to use to obtain quantile of MRC for specified alpha
lengths
vector of interval lengths to use, dyadic intervals by default
penalty
penalty term in the multiresolution statistic: "none" for no penalty, "len" for penalizing the length of an interval, "var" for penalizing the variance over an interval, and "sqrt" for penalizing the squ
family, param
specifies distribution of data, see family
subset
a subset of indices of y for which bounds should be aggregated
name,pos
under which name and where precomputed results are stored, or retrieved, see assign
max.iter
maximal iterations in Newton's method to compute non-Gaussian MRC bounds
eps
tolerance in Newton's method
x
an object of class bounds

Value

  • Returns an object of class bounds, i.e. a list whose entry bounds contains two-sided bounds (lower and upper) of the considered intervals (with left index li and right index ri) in a data.frame, along with a vector start specifying in which row of entry bounds intervals with corresponding li start (if any; specified as a C-style index), and a logical feasible telling whether a feasible solution exists for these bounds (always TRUE for MRC bounds which are not restricted to a subset).

See Also

stepbound, family

Examples

Run this code
# simulate signal of 100 data points
Y <- rpois(100, 1:100 / 10)
# compute bounds for intervals of dyadic lengths
b <- bounds(Y, penalty="len", family="poisson", q=4)
# compute bounds for all intervals
b <- bounds(Y, penalty="len", family="poisson", q=4, lengths=1:100)

Run the code above in your browser using DataLab