Learn R Programming

eBsc (version 4.17)

plot.eBsc: Plot fitted components

Description

Plot fitted components and the acf of the errors.

Usage

# S3 method for eBsc
plot(x,full=FALSE,...)

Value

The function returns the selected plots.

Arguments

x

eBsc object.

full

plot option. If TRUE graphial details of the estimation are provided. If FALSE a simple plot of the estimation and its confidence bands is provided.

...

further arguments to be passed to plot().

Author

Francisco Rosales, Paulo Serra, Tatyana Krivobokova.

Details

if the eBsc plots the fits and the acf of the errors.

References

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

Examples

Run this code

library(eBsc)
n <- 250
sigma <- 0.05
Basis <- list()
for(i in 1:6) Basis[[i]] <- drbasis(nn = n, qq = i)
coef3 <- c(rep(0,3),(pi*(2:(n-2)))^(-3.1))*(cos(2*(1:n)))
A3 <- Basis[[3]]$eigenvectors
mu <- A3%*%coef3
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)

#simple plot by  
plot(fit, full = FALSE)

Run the code above in your browser using DataLab