Skip to content
R-package ffscb: fast n' fair simultaneous confidence bands for functional parameters
R
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Applications
Simulations
ffscb
.gitignore update gitignore May 28, 2019
LICENSE
Make_package.R
PRJ_ffscb_pkg.Rproj fregion to ffscb Mar 21, 2019
README.md updates Oct 3, 2019

README.md

R-package: ffscb

The R-package ffscb contains the fast 'n' fair simultaneous confidence bands for functional parameters as introduced in the paper Fast and Fair Simultaneous Confidence Bands for Functional Parameters (arXiv:1910.00131) by Dominik Liebl and Matthew Reimherr.

The folders Simulations and Applications contain r-scripts to reproduce the results in Section 3 and Section 4 of the manuscript.

Installation

devtools::install_github("lidom/ffscb/ffscb")

Getting Started

library("ffscb")
help("ffscb")

Example Codes

# Generate a sample
p          <- 200 
N          <- 80 
grid       <- make_grid(p, rangevals=c(0,1))
mu         <- meanf_poly(grid,c(0,.25)) 
names(mu)  <- grid
cov.m      <- make_cov_m(cov.f = covf.nonst.matern, grid=grid, cov.f.params=c(2, 1/4, 1/4))
sample     <- make_sample(mu,cov.m,N)

# Compute the estimate, hat.mu, and its covariance, hat.cov.mu
hat.mu     <- rowMeans(sample)
hat.cov    <- crossprod(t(sample - hat.mu)) / N
hat.cov.mu <- hat.cov / N

# Compute the tau-parameter 
# I.e., the 'roughness parameter function' needed for the KR- and FFSCB-bands
hat.tau    <- tau_fun(sample)

# Make and plot confidence bands
b <- confidence_band(x = hat.mu, cov.x = hat.cov.mu, tau = hat.tau, df = N-1,
                     n_int = 5, t0 = 1, conf.level  = 0.95,
                     type = c("FFSCB.t", "Bs", "BEc", "naive.t"))
plot(b)

Legend for band-type:

Argument Description
FFSCB.t Our fast 'n' fair simultaneous confidence band
Bs Bootstrap based simultaneous confidence band similar to Degras (2011)
BEc Simultaneous confidence band of Choi and Reimherr (2018)
naive.t Naive pointwise confidence band
You can’t perform that action at this time.