deriv_ar1: Analytic D matrix for AR(1) process

Description Usage Arguments Value Process Haar WV First Derivative Author(s) Examples

View source: R/RcppExports.R

Description

Obtain the first derivative of the AR(1) process.

Usage

1
deriv_ar1(phi, sigma2, tau)

Arguments

phi

A double corresponding to the phi coefficient of an AR(1) process.

sigma2

A double corresponding to the error term of an AR(1) process.

tau

A vec containing the scales e.g. 2^tau

Value

A matrix with the first column containing the partial derivative with respect to phi and the second column contains the partial derivative with respect to sigma^2

Process Haar WV First Derivative

Taking the derivative with respect to phi yields:

d/dphi nu[j]^2(phi,sigma2) = (2*sigma2)/((phi-1)^4*(phi+1)^2 * tau[j]^2)*((phi^2-1)*tau[j]*(-2*phi^(tau[j]/2)+phi^(tau[j]) - phi - 1) - (phi*(3*phi+2)+1)*(-4*phi^(tau[j]/2)+phi^(tau[j])+3))

Taking the derivative with respect to sigma^2 yields:

d/dsigma2 nu[j]^2(phi,sigma2) = ((phi^2-1)*tau[j]+2*phi*(-4*phi^(tau[j]/2) + phi^(tau[j]) + 3))/((phi-1)^3*(phi+1)*tau[j]^2)

Author(s)

James Joseph Balamuta (JJB)

Examples

1
deriv_ar1(.3, 1, 2^(1:5))

SMAC-Group/gmwm documentation built on Sept. 11, 2021, 10:06 a.m.