inst/tests/comparisons/localEst.R

###
# compute local estimator, has to be implemented for all parametric families
# localEst <- function(y, left, right, lb, ub, ...)
# further parameters can be added,
# but ... is always necessary to absorb unused parameters
# return single numeric
###

# family Gauss: independent homogeneous gaussian observations
localEstGauss <- function(y, left, right, lb, ub, ...) {
  max(min(mean(y[left:right]), ub), lb)
}

Try the stepR package in your browser

Any scripts or data that you put into this service are public.

stepR documentation built on Nov. 14, 2023, 1:09 a.m.