Learn R Programming

nowcasting (version 1.1.4)

month2qtr: Monthly to quarterly transformation

Description

It transforms a monthly time series in a quarterly one, selecting the last month of the quarter to represent the value of the quarter.

Usage

month2qtr(x, reference_month = 3)

Arguments

x

a ts or mts in monthly frequency

reference_month

a vector to define the reference month that will represent the quarter. Default is 3. The options are 1, 2, 3 or 'mean'.

Value

The correspondent quarterly transformation.

Examples

Run this code
# NOT RUN {
 
# }
# NOT RUN {
# Selecting only the last month of time series IPCA:
month2qtr(BRGDP$base[,"IPCA"], reference_month = 3)

# Selecting only the first month of time series IPCA:
month2qtr(BRGDP$base[,"IPCA"], reference_month = 1)
# }

Run the code above in your browser using DataLab