avgts {BCDating}R Documentation

TimeSeries averages over cycle phases.

Description

This function returns the averages of the input time series over each of phases in the Dating. It omits the NA's in the time series, so will give an error with internal NA's.

Usage

avgts(ts,Dating) 

Arguments

ts

The input time series.

Dating

The dating.

Value

A ts timeseries.

Author(s)

Majid Einian,m.einian@mbri.ac.ir,
Monetary and Banking Research Institute, Central Bank of Islamic Republic of Iran

Examples

data("Iran.non.Oil.GDP.Quarterly.Growth")
data("MBRI.Iran.Dating")
avggrowth <- avgts(Iran.non.Oil.GDP.Quarterly.Growth,MBRI.Iran.Dating)
cbind(avggrowth,Iran.non.Oil.GDP.Quarterly.Growth)
plot(MBRI.Iran.Dating,avggrowth)
plot(MBRI.Iran.Dating,Iran.non.Oil.GDP.Quarterly.Growth,averages=TRUE)










[Package BCDating version 0.9.8 Index]