FDRSeg (version 1.0-2)

evalStepFun: Evaluate step function

Description

Transform the return value by smuce, fdrseg, or dfdrseg into a numeric vector.

Usage

evalStepFun(stepF)

Arguments

stepF

a list returned by smuce, fdrseg, or dfdrseg with components

value function values on each segment of the estimator
left  indices of leftmost points within each segment of the estimator
n     number of samples

Value

A numeric vector gives function values of stepF at sampling locations.

See Also

smuce, fdrseg, dfdrseg

Examples

Run this code
# NOT RUN {
# simulate data
set.seed(2)
u0 <- c(rep(1, 5), rep(5, 5))
Y  <- rnorm(10, u0)

# compute the SMUCE estimate
uh <- smuce(Y)

# print results
#   step function returned by smuce
print(uh)
#   vector returned by evalStepFun
print(evalStepFun(uh))
# }

Run the code above in your browser using DataLab