Learn R Programming

gmwm (version 2.0.0)

ar1_to_wv: AR1 process to WV

Description

This function compute the WV (haar) of an AR(1) process

Usage

ar1_to_wv(phi, sig2, tau)

Arguments

phi
A double that is the phi term of the AR(1) process
sig2
A double corresponding to variance of AR(1) process
tau
A vec containing the scales e.g. 2^tau

Value

A vec containing the wavelet variance of the AR(1) process.

Examples

Run this code
x.sim = gen_ar1( N = 10000, phi = 0.9, sigma2 = 4 )
ntau = floor(log(length(x.sim),2))
tau = 2^(1:ntau)
wv.theo = ar1_to_wv(phi = 0.9, sig2 = 16, tau)
plot(tau, wv.theo, col = "red")

Run the code above in your browser using DataLab