Learn R Programming

nowcasting (version 1.1.4)

qtr2month: Quarterly to monthly transformation

Description

It transforms a quarterly time series in a monthly one. The values of the quarterly ts are set to the last month of the quarter.

Usage

qtr2month(x, reference_month = 3, interpolation = FALSE)

Arguments

x

a ts or mts in quarterly frequency

reference_month

a integer to define the position of a quarter value in a quarter. Default is 3. The options are 1, 2 or 3.

interpolation

logical. The NA values can be estimated by linear interpolation (approx function from stats package). Default is FALSE.

Value

The correpondent monthly transformation.

Examples

Run this code
# NOT RUN {
# Selecting the quarterly GDP variable in BRGDP
qtr2month(BRGDP$GDP) 

# }

Run the code above in your browser using DataLab