4 Matching Annotations
  1. Last 7 days
    1. # shade the term spread polygon(c(time(TB3MS), rev(time(TB3MS))), c(TB10YS, rev(TB3MS)), col = alpha("steelblue", alpha = 0.3), border = NA)

      This code works well: tt <- if (!is.null(attr(Spread, "index"))) index(Spread) else time(Spread) y10 <- as.numeric(TB10YS) y3 <- as.numeric(TB3MS)

      polygon( x = c(tt, rev(tt)), y = c(y10, rev(y3)), col = alpha("steelblue", 0.3), border = NA )

    1. summary(ur.ers(log(window(GDP, start = c(1962, 1), end = c(2012, 4))), model = "trend", lag.max = 2))

      I continued working on the inflation rate in the United States. The DF-GLS test:

      summary(ur.ers(400 * diff(PCECTPI), model = "trend", lag.max = 2)).

      The output:

      Value of test-statistic is: -2.7078

      Critical values of DF-GLS are: 1pct 5pct 10pct critical values -3.48 -2.89 -2.57

    1. stargazer(CRSP_ADL_1, CRSP_ADL_2, CRSP_ADL_3, title = "ADL Models of Monthly Excess Stock Returns", header = FALSE, type = "latex", column.sep.width = "-5pt", no.space = T, digits = 3, column.labels = c("ADL(1,1)", "ADL(2,2)", "ADL(1,1)"), dep.var.caption = "Dependent Variable: Excess returns on the CSRP value-weighted index", dep.var.labels.include = FALSE, covariate.labels = c("$excess return_{t-1}$", "$excess return_{t-2}$", "$1^{st} diff log(dividend yield_{t-1})$", "$1^{st} diff log(dividend yield_{t-2})$", "$log(dividend yield_{t-1})$", "Constant"), se = rob_se_CRSP_ADL)

      If you want view the table in the consola, change type="latex" by type="text"

    2. # plot logarithm of dividend yield series plot(StockReturns[, 2], col = "steelblue", lwd = 2, ylab = "Logarithm", main = "Dividend Yield for CRSP Index")

      Alternative link to Stock Returns: https://www.princeton.edu/~mwatson/Stock-Watson_3u/Students/EE_Datasets/Stock_Returns_1931_2002.xlsx With this data is:

      StockReturns <- ts(StockReturns[, 3:4], start = c(1931, 1), end = c(2002, 12), frequency = 12)

      plot(StockReturns[, 2], col = "steelblue", lwd = 2, ylab = "Logarithm", main = "Dividend Yield for CRSP Index")