Learn R Programming

dynamac (version 0.1.4)

area.simulation.graph: Create an area graph of a simulated response in a dynardl model

Description

Create an area graph of a simulated response in a dynardl model

Usage

area.simulation.graph(x, changes = FALSE, bw = FALSE)

Arguments

x

a dynardl model with a simulation to be graphed

changes

whether the graph should be shown in levels of the dependent variable or in changes in levels. The default is FALSE

bw

should the colors be in black and white (for publication)? The default is FALSE

Value

an area graph

Details

When running dynardl, simulate must be true so that there is a simulation to graph.

Examples

Run this code
# NOT RUN {
# Using the ineq data in dynamac
# Shocking Income Top 10
ardl.model <- dynardl(concern ~ incshare10 + urate, data = ineq, 
       lags = list("concern" = 1, "incshare10" = 1),
       diffs = c("incshare10", "urate"), 
       lagdiffs = list("concern" = 1),
       ec = TRUE, simulate = TRUE, range = 30,
       shockvar = "incshare10", graph = FALSE)
area.simulation.graph(ardl.model)	# Shows absolute levels
area.simulation.graph(ardl.model, changes = TRUE)  # Shows changes from mean level
area.simulation.graph(ardl.model, bw = TRUE)	 # Grayscale plots
# }

Run the code above in your browser using DataLab