Learn R Programming

nowcasting (version 0.1.3)

nowcast.plot: Plot for nowcast output function

Description

Make plots to visualize the output of nowcast function

Usage

nowcast.plot(out, type = "fcst")

Arguments

out

output of nowcast function.

type

'fcst', 'factors', 'eigenvalues','eigenvectors' or 'month_y'. This last one is only available for EM method. 'eigenvalues' and 'eigenvectors' only available to two stages methods.

Examples

Run this code
# NOT RUN {
gdp <- month2qtr(x = USGDP$base[,"RGDPGR"])
gdp_position <- which(colnames(USGDP$base) == "RGDPGR")
base <- Bpanel(base = USGDP$base[,-gdp_position],
               trans = USGDP$legend$Transformation[-gdp_position],
               aggregate = TRUE)
now2sq <- nowcast(y = gdp, x = base, r = 2, p = 2, q = 2, method = '2sq')

nowcast.plot(now2sq, type = "fcst")
nowcast.plot(now2sq, type = "factors")
nowcast.plot(now2sq, type = "eigenvalues")
nowcast.plot(now2sq, type = "eigenvectors")

base <- Bpanel(base = USGDP$base[,-gdp_position],
               trans = USGDP$legend$Transformation[-gdp_position],
               aggregate = FALSE)
now2sm <- nowcast(y = gdp, x = base, r = 2, p = 2, q = 2, method = '2sm')

nowcast.plot(now2sm, type = "fcst")
nowcast.plot(now2sm, type = "factors")
nowcast.plot(now2sm, type = "eigenvalues")
nowcast.plot(now2sm, type = "eigenvectors")
# }

Run the code above in your browser using DataLab