perturbFBM: Simulation of a perturbed fBm

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/perturbFBM.R

Description

Simulation of a sample path of a fractional Brownian motion contaminated by outliers or an additive Gaussian noise

Usage

1
perturbFBM(n, H, C = 1, type = "no", SNR=NULL,plot = FALSE)

Arguments

n

sample size

H

Hurst parameter

C

scaling coefficient. Default is 1

type

type of perturbation. Possible choices are "no","B0","B1","AO"

SNR

Signal Noise Ratio parameter for the contamination

plot

if plot is TRUE a (2,2) plot of the sample path of the fractional Brownian motion, the fractional Gaussian noise and their contaminated version is produced. Default is FALSE

Details

Possible contaminated models are

"no"

no contamination

"AO"

additive outliers models. 0.5\% of the data are perturbed by Gaussian variables with variance such that the SNR equals SNR.

"B0"

FBM + σ* B0 where B0 is a standard Brownian motion. σ is chosen such that the SNR of the increments equals SNR

"B1"

FBM+ σ * B1 where B1 are i.i.d. Gaussian standard variables. σ is chosen such that the SNR of the increments equals SNR

See Achard and Coeurjolly (2009) for a more detailed description.

Value

returns a vector of length n of a dsicretized sample path of a fractional Brownian motion with parameters (H,C) at times i=1,...,n possibly contaminated by an additive outliers models, a Brownian motion or a Gaussian white noise.

Author(s)

J.-F. Coeurjolly

References

S. Achard and J.-F. Coeurjolly (2009). Discrete variations of the fractional Brownian in the presence of outliers and an additive noise. Submitted

See Also

circFBM, dvFBM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
n<-1000;H1<-.3;H2<-.8
## "no"
tmp1<-perturbFBM(n,H1,type="no",plot=TRUE)
tmp2<-perturbFBM(n,H2,type="no",plot=TRUE)
## "AO"
tmp3<-perturbFBM(n,H1,type="AO",SNR=0,plot=TRUE)
tmp4<-perturbFBM(n,H2,type="AO",SNR=-20,plot=TRUE)
## "B0"
tmp5<-perturbFBM(n,H1,type="B0",SNR=10,plot=TRUE)
tmp6<-perturbFBM(n,H2,type="B0",SNR=0,plot=TRUE)
## "B1"
tmp7<-perturbFBM(n,H1,type="B1",SNR=10,plot=TRUE)
tmp8<-perturbFBM(n,H2,type="B1",SNR=0,plot=TRUE)

Example output

Loading required package: wmtsa

dvfBm documentation built on May 29, 2017, 9:08 p.m.