Skip to content

Commit

Permalink
Run some checks, add stats imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolas Kuschnig committed Aug 30, 2019
1 parent ab3485d commit 947a5c8
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 37 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: BVAR
Type: Package
Title: Hierarchical Bayesian Vector Autoregression
Version: 0.1.6.9000
Version: 0.1.6
Date: 2019-08-28
Authors@R: c(person("Nikolas", "Kuschnig", role = c("aut", "cre"), email = "nikolas.kuschnig@wu.ac.at"),
person("Lukas", "Vashold", role = "aut"),
Expand All @@ -15,7 +15,7 @@ URL: https://github.com/nk027/bvar
BugReports: https://github.com/nk027/bvar/issues
Depends: R (>= 3.3.0)
Imports: MASS, stats, graphics, utils
Suggests: vars, coda
Suggests: vars
License: GPL-3
Encoding: UTF-8
LazyData: true
Expand Down
7 changes: 5 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ export(bv_metropolis)
export(bv_mh)
export(bv_minnesota)
export(bv_mn)
export(bv_plot)
export(bv_plot_density)
export(bv_plot_fcast)
export(bv_plot_irf)
export(bv_plot_trace)
export(bv_priors)
export(bv_psi)
Expand All @@ -60,13 +59,17 @@ importFrom(graphics,par)
importFrom(graphics,plot)
importFrom(graphics,polygon)
importFrom(stats,arima)
importFrom(stats,coef)
importFrom(stats,density)
importFrom(stats,dgamma)
importFrom(stats,fitted)
importFrom(stats,optim)
importFrom(stats,predict)
importFrom(stats,quantile)
importFrom(stats,residuals)
importFrom(stats,rnorm)
importFrom(stats,runif)
importFrom(stats,ts.plot)
importFrom(stats,vcov)
importFrom(utils,setTxtProgressBar)
importFrom(utils,txtProgressBar)
3 changes: 3 additions & 0 deletions R/80_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
#'
#' # Compare with second chain
#' plot(x, chains = y)
#'
#' # Only plot the marginal likelihood's density
#' plot(x, "dens", "ml")
#' }
plot.bvar <- function(
x,
Expand Down
5 changes: 2 additions & 3 deletions R/91_fitted.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
#' @param conf_bands Numeric vector of desired confidence bands to apply.
#' E.g. for bands at 5\%, 10\%, 90\% and 95\% set this to \code{c(0.05, 0.1)}.
#' Note that the median, i.e. 0.5 is always included.
#' @param n_thin Integer scalar. Every \emph{n_thin}'th draw in \emph{object}
#' is used for forecasting, others are dropped. Defaults to \code{100L}, to
#' prevent memory overflow.
#'
#' @param x Object of class \code{bvar_fitted} / \code{bvar_resid}.
#' @param digits Integer scalar. Fed to \code{\link[base]{round}} and applied to
Expand All @@ -26,6 +23,8 @@
#'
#' @export
#'
#' @importFrom stats fitted residuals
#'
#' @examples
#' \donttest{
#' data <- matrix(rnorm(200), ncol = 2)
Expand Down
2 changes: 2 additions & 0 deletions R/92_coef.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#'
#' @export
#'
#' @importFrom stats coef vcov
#'
#' @examples
#' \donttest{
#' data <- matrix(rnorm(200), ncol = 2)
Expand Down
4 changes: 1 addition & 3 deletions R/deprecated.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,14 @@ bv_plot_irf <- function(
variables = NULL,
vars_impulse = NULL,
vars_response = NULL,
orientation = c("vertical", "horizontal"),
mar = c(2, 2, 2, 0.5),
...) {

.Deprecated("plot.bvar_irf")
plot_fcast(
plot_irf(
x, conf_bands,
variables = variables,
vars_impulse = vars_impulse, vars_response = vars_response,
orientation = orientation,
mar = mar, ... = ...)
}

Expand Down
10 changes: 0 additions & 10 deletions R/methods.R

This file was deleted.

1 change: 1 addition & 0 deletions man/bv_plot_trace.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/coef.bvar.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 2 additions & 9 deletions man/fitted.bvar.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions man/plot.bvar.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions man/plot.bvar_fcast.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions man/plot.bvar_irf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 947a5c8

Please sign in to comment.