Description Usage Arguments Value References See Also Examples

Estimate nowcasting and forecasting for a quarterly series. For more details read the Vignettes.

1 2 |

`y` |
Stationary quarterly time series. |

`x` |
A monthly time series matrix ( |

`q` |
Dynamic rank. Number of error terms. |

`r` |
number of commom factors. |

`p` |
AR order of factor model. |

`method` |
There are three options: |

`blocks` |
a binary matrix Nx3 that characterizes the regressors variables in global (1st column), nominal (2nd column) and real (3rd column). If |

`oldFactorsParam` |
a list containing estimated factors parameters from nowcast function. |

`oldRegParam` |
a list containing estimated regression parameters from nowcast function. |

A `list`

containing two elements:

`yfcst` |
the original |

`reg` |
regression model between |

`factors` |
the estimated factors and DFM model coefficients. |

`xfcst` |
the original regressors and their out-of-sample estimations. |

`month_y` |
the monthly measure for quarterly |

Giannone, D., Reichlin, L., & Small, D. (2008). Nowcasting: The real-time informational content of macroeconomic data. Journal of Monetary Economics, 55(4), 665-676.<doi:10.1016/j.jmoneco.2008.05.010>

Bańbura, M., & Rünstler, G. (2011). A look into the factor model black box: publication lags and the role of hard and soft data in forecasting GDP. International Journal of Forecasting, 27(2), 333-346. <doi:10.1016/j.ijforecast.2010.01.011>

Bańbura M., Giannone, D. & Reichlin, L. (2011). Nowcasting, in Michael P. Clements and David F. Hendry, editors, Oxford Handbook on Economic Forecasting, pages 193-224, January 2011. <doi:10.1093/oxfordhb/9780195398649.001.0001>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | ```
## Not run:
### Method 2sq (two stages: quarterly factors)
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')
### Method 2sm (two stages: monthly factors)
base <- Bpanel(base = USGDP$base[,-gdp_position],
trans = USGDP$legend$Transformation[-gdp_position],
aggregate = F)
now2sm <- nowcast(y = gdp, x = base, r = 2, p = 2, q = 2, method = '2sm')
### Method EM
# selecting and transforming y
gdp <- month2qtr(x = USGDPshort$base[,"GDPUS"])
gdp <- ts(c(gdp,NA,NA,NA,NA), start = start(gdp), frequency = 4)
gdp_stationary <- gdp/lag(gdp, k = -1) -1
gdp_position <- which(colnames(USGDPshort$base) == "GDPUS")
# selecting and transforming x
base <- USGDPshort$base[,-gdp_position]
trans <- USGDPshort$legend[-gdp_position,"transformation"]
stationaryBase <- cbind(base[,trans == 1]/lag(base[,trans == 1], k = -1) - 1,
diff(base[,trans == 2]))
colnames(stationaryBase) <- colnames(base)[c(which(trans == 1),which(trans == 2)) ]
stationaryBase <- stationaryBase[,colnames(base)]
# DFM estimation via EM
blocks <- matrix(c(1,0,1,1,0,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,
0,1,1,0,1,1,0,1,0,1,1,1,0,1,1,0,1,0,1,1,1,0,1,1,0,1,
1,0,1,0,1,1,0,1,1,0,1,1,0,1,1,1,0,1,0,1,1,0,1,1,1,0), byrow = T, ncol = 3)
nowEM <- nowcast(y = gdp_stationary, x = stationaryBase, r = 1, p = 1, q = 1,
method = 'EM', blocks = blocks)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.