deriv_ar1: Analytic D matrix for AR(1) process

View source: R/RcppExports.R

deriv_ar1R Documentation

Analytic D matrix for AR(1) process

Description

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

Usage

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:

\frac{\partial }{{\partial \phi }}\nu _j^2\left( {\phi ,{\sigma ^2}} \right) = \frac{{2{\sigma ^2}\left( {\left( {{\phi ^2} - 1} \right){\tau _j}\left( { - 2{\phi ^{\frac{{{\tau _j}}}{2}}} + {\phi ^{{\tau _j}}} - \phi - 1} \right) - \left( {\phi \left( {3\phi + 2} \right) + 1} \right)\left( { - 4{\phi ^{\frac{{{\tau _j}}}{2}}} + {\phi ^{{\tau _j}}} + 3} \right)} \right)}}{{{{\left( {\phi - 1} \right)}^4}{{\left( {\phi + 1} \right)}^2}\tau _j^2}}

Taking the derivative with respect to \sigma ^2 yields:

\frac{\partial }{{\partial {\sigma ^2}}}\nu _j^2\left( {\phi ,{\sigma ^2}} \right) = \frac{{\left( {{\phi ^2} - 1} \right){\tau _j} + 2\phi \left( { - 4{\phi ^{\frac{{{\tau _j}}}{2}}} + {\phi ^{{\tau _j}}} + 3} \right)}}{{{{\left( {\phi - 1} \right)}^3}\left( {\phi + 1} \right)\tau _j^2}}

Author(s)

James Joseph Balamuta (JJB)


simts documentation built on Aug. 31, 2023, 5:07 p.m.