bounds {stepR}R Documentation

Bounds based on MRC

Description

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

Deprecation warning: This function is deprecated, but still working, however, may be defunct in a future version. Please use instead the function computeBounds. An example how to reproduce results (currently only family "gauss" is supported) is given below.

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 = .MCstepR,
  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 square root of the MRC

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

computeBounds, stepbound, family

Examples

y <- rnorm(100, c(rep(0, 50), rep(1, 50)), 0.5)
b <- computeBounds(y, q = 4, intervalSystem = "dyaLen", penalty = "none")
b <- b[order(b$li, b$ri), ]
attr(b, "row.names") <- seq(along = b$li)

# entries in bounds are recovered by computeBounds
all.equal(bounds(y, q = 4)$bounds, b) # TRUE


# 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)

[Package stepR version 2.1-9 Index]