R/ardec.trend.R

Defines functions ardec.trend

Documented in ardec.trend

ardec.trend <-
function(x){

options(warn=-1)

fit=ardec.lm(x)


comp=ardec(x,fit$coefficients)

if(any(comp$period==Inf)){warning("no trend component")}


if(any(comp$period ==Inf)){
                l=comp$period[which(match(comp$period,Inf)==1)[1]]
                m=comp$modulus[which(match(comp$period,Inf)==1)[1]]
                gt=Re(comp$comps[which(match(comp$period,Inf)==1 )[1],])

 }


return(list(modulus=m,trend=gt))  





}

Try the ArDec package in your browser

Any scripts or data that you put into this service are public.

ArDec documentation built on June 1, 2022, 1:06 a.m.