Skip to content

Commit

Permalink
plot irfs for a series vs its own shock
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Clark committed Sep 18, 2024
1 parent 2d0b304 commit d13c767
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 19 deletions.
23 changes: 7 additions & 16 deletions R/mvgam_irf-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,6 @@ plot.mvgam_irf = function(x, series = 1, ...){
} else { ppp <- 1; oldpar <- par()}

for(x in 1:n_plots){
if(x == series){
plot(x = 1:h, y = 1:h, type = "n", bty = 'L',
ylim = c(-2, 2),
yaxt = 'n',
xaxt = 'n',
ylab = '',
xlab = '')
abline(h = 0, lwd = 2.5)
box(bty = 'l', lwd = 2)

} else {
responses <- do.call(rbind, lapply(seq_along(impulse_responses), function(j){
impulse_responses[[j]][[1]][,x]
}))
Expand Down Expand Up @@ -104,12 +93,14 @@ plot.mvgam_irf = function(x, series = 1, ...){
abline(h = 0, lwd = 3, col = 'white')
abline(h = 0, lwd = 2.5)
box(bty = 'L', lwd = 2)
}

if(x != series){
axis(1, cex.axis = 1, tck = -0.05)
title(paste0('process_', series, ' -> process_', x), line = 0)
}
axis(1, cex.axis = 1, tck = -0.05)
title(paste0('process_', series, ' -> process_', x), line = 0)

# if(x != series){
# axis(1, cex.axis = 1, tck = -0.05)
# title(paste0('process_', series, ' -> process_', x), line = 0)
# }

}
layout(1)
Expand Down
Binary file modified docs/reference/Rplot002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/fevd.mvgam-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/reference/fevd.mvgam.html

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

2 changes: 1 addition & 1 deletion docs/reference/plot.mvgam_fevd.html

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

Binary file modified src/mvgam.dll
Binary file not shown.

0 comments on commit d13c767

Please sign in to comment.