ABToRPhase: Convert harmonic regression parameters to A*cos+B*sin form

Description Usage Arguments Value Author(s) Examples

Description

The harmonic regression is usually fitted as z(t) = mu + A*cos(2*pi*f*t) + B*sin(2*pi*f*t) but is more meaningfully expressed as z(t) = mu + R*cos(2*pi*f*t + 2*pi*phi), where R and -0.5<phi=0.5 are the amplitude and phase. This function converts the parameters to the amplitude-phase parameterization.

Usage

1

Arguments

AB

Vector containing the A and B coefficients respectively.

Value

vector c(R, phi)

Author(s)

Yuanhao Lai and A. I. McLeod

Examples

1
2
3
#Bloomfield ozone example, p.17
harper:::ABToRPhase(c(-4.205,1.075))
                                                        

CliffordLai/harper documentation built on May 8, 2019, 1:53 p.m.