diff --git a/.Rbuildignore b/.Rbuildignore index 938e05a..c46ce7c 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -11,3 +11,4 @@ ^CRAN-RELEASE$ ^development_test.R$ ^\.github$ +^CRAN-SUBMISSION$ diff --git a/.github/.gitignore b/.github/.gitignore index 2d19fc7..1d96d83 100644 --- a/.github/.gitignore +++ b/.github/.gitignore @@ -1 +1,2 @@ *.html +cran-comments.md \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8de1d3f..d06d541 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ .RData .Ruserdata to-do.md -CRAN-RELEASE \ No newline at end of file +cran-comments.md \ No newline at end of file diff --git a/DESCRIPTION b/DESCRIPTION index 3363496..dca0ad4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: sovereign Title: State-Dependent Empirical Analysis -Version: 1.2.0 +Version: 1.2.1 Authors@R: person(given = "Tyler J.", family = "Pike", diff --git a/NEWS.md b/NEWS.md index 5c1a014..79f51c7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,11 @@ # Sovereign: State-Dependent Empirical Analysis +## Version 1.2.1 +(2021-12-30) +- Bug fixes + - removed as.vector() call in solve_b.R + - change is.na to anyNA in regimes() + ## Version 1.2.0 (2021-07-23) diff --git a/R/covid_correction.R b/R/covid_correction.R index ad51ab4..c1af898 100644 --- a/R/covid_correction.R +++ b/R/covid_correction.R @@ -147,7 +147,8 @@ covid_volatility_correction = function( N = N ) - theta = as.vector(theta$par) + # theta = as.vector(theta$par) + theta = theta$par # correct data ------------------------------- diff --git a/R/regimes.R b/R/regimes.R index a5c261e..a8a9bf4 100644 --- a/R/regimes.R +++ b/R/regimes.R @@ -90,7 +90,7 @@ regimes = function( breakpoints = strucchange::breakpoints(x ~ lag(x), data = X) breakpoints$breakpoints - if(is.na(breakpoints$breakpoints)){ + if(anyNA(breakpoints$breakpoints)){ regimes = data.frame(date = X.date, X, regime = 0) }else{ regimes.val = c(0:length(breakpoints$breakpoints)) diff --git a/R/sovle_b.R b/R/sovle_b.R index 0ac9276..9f234fb 100644 --- a/R/sovle_b.R +++ b/R/sovle_b.R @@ -85,8 +85,7 @@ solve_B = function(var, report_iv = TRUE){ second_stage_beta = model.second_stage$coefficients[2] return(second_stage_beta) - }) %>% - as.vector() + }) # scale size of the shock # see Gertler and Karadi (2015) for background diff --git a/README.md b/README.md index 46bae6f..b508a3d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0) [![CRAN status](https://www.r-pkg.org/badges/version/sovereign)](https://CRAN.R-project.org/package=sovereign) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) -[![codecov](https://codecov.io/gh/tylerJPike/sovereign/branch/main/graph/badge.svg?token=WXLWR6H93B)](https://codecov.io/gh/tylerJPike/sovereign) +[![codecov](https://codecov.io/gh/tylerJPike/sovereign/branch/main/graph/badge.svg?token=WXLWR6H93B)](https://app.codecov.io/gh/tylerJPike/sovereign) [![R-CMD-check](https://github.com/tylerJPike/sovereign/workflows/R-CMD-check/badge.svg)](https://github.com/tylerJPike/sovereign/actions) diff --git a/index.md b/index.md index 53ca515..d2f8626 100644 --- a/index.md +++ b/index.md @@ -4,7 +4,7 @@ [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0) [![CRAN status](https://www.r-pkg.org/badges/version/sovereign)](https://CRAN.R-project.org/package=sovereign) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) -[![codecov](https://codecov.io/gh/tylerJPike/sovereign/branch/main/graph/badge.svg?token=WXLWR6H93B)](https://codecov.io/gh/tylerJPike/sovereign) +[![codecov](https://codecov.io/gh/tylerJPike/sovereign/branch/main/graph/badge.svg?token=WXLWR6H93B)](https://app.codecov.io/gh/tylerJPike/sovereign) [![Build Status](https://travis-ci.org/tylerJPike/sovereign.svg?branch=main)](https://travis-ci.org/tylerJPike/sovereign)