eBsc-package {eBsc}R Documentation

Empirical Bayes Smoothing Splines with Correlated Errors

Description

Empirical Bayes smoothing splines with correlated errors. The method uses a recursive algorithm for signal extraction with a non-parametric estimation of the correlation matrix of the errors.

Details

Package: eBsc
Version: 4.17
Date: 2023-05-01
Depends: Brobdingnag, parallel, nlme, Matrix, MASS, mvtnorm

Index:

eBsc                  Empirical Bayes smoothing splines with correlated errors
plot.eBsc             Plots fitted curves from the filter
summary.eBsc          Summary information of the error

The function eBsc() is used to fit the model. Using the resulting eBsc object and summary information on the errors can be printed using summary.

Author(s)

Francisco Rosales, Paulo Serra, Tatyana Krivobokova Maintainer: Francisco Rosales <francisco.rosales-marticorena@protonmail.com>

References

Serra, P. and Krivobokova, T. (2015)
Adaptive Empirical Bayesian Smoothing Splines

See Also

stl (package stats), HoltWinters (package stats)

Examples

# simulated data for non-correlated errors
library(eBsc)
n <- 250
sigma <- 0.05
beta <- function(x,p,q){
	gamma(p+q)/(gamma(p)*gamma(q))*x^(p-1)*(1-x)^(q-1)
}
x <- seq(0, 1, length.out = n)
mu <- (6 * beta(x, 30, 17) + 4 * beta(x, 3, 11))/10;
mu <- (mu - min(mu))/(max(mu) - min(mu))
noise <- rnorm(n)
y <- mu + sigma * noise

#q assumed known and equal to 3, and correlation unknown
fit <- eBsc(y, method = "N", q=3)
plot(fit, full = FALSE)

[Package eBsc version 4.17 Index]