dynardl.simulation.plot {dynamac} | R Documentation |
Create a plot of a simulated response in a dynardl
model
Description
Create a plot of a simulated response in a dynardl
model
Usage
dynardl.simulation.plot(
x,
type = "area",
response = "levels",
bw = FALSE,
last.period = NULL,
tol = (abs(x$model$ymean) * 0.01),
start.period = 1,
abs.errors = "none",
ylim = NULL,
ylab = NULL,
xlab = NULL,
...
)
Arguments
x |
a |
type |
whether the plot should be an area plot ( |
response |
whether the plot of the response should be shown in levels of the dependent variable ( |
bw |
should the colors be in black and white (for publication)? The default is |
last.period |
when deciding when to stop calculating the absolute value of the shocks to the dependent variable, you can specify a specific period in which to stop calculating absolute cumulative differences. Specify a |
tol |
when deciding when to stop calculating the absolute value of the shocks to the dependent variable, you can specify the minimum amount of movement required to qualify as a non-noise change over time periods (for calculating absolute cumulative differences). The default is 0.1 percent of the mean of the dependent variable. Specify a |
start.period |
which period of the simulation to begin the plot with. You can view the equilibriating behavior of the dependent variable, or you can skip forward in time (maybe to just before the shock). The default is |
abs.errors |
when calculating confidence for the absolute cumulative effect, should differences accumulate in each time time period ( |
ylim |
a user-defined y-limit to be used instead of the default (for instance, for shared axes) |
ylab |
a user-defined y-label to be used instead of the default |
xlab |
a user-defined x-label to be used instead of the default |
... |
other arguments to be passed to the call to plot |
Details
When running dynardl
, simulate
must be TRUE
so that there is a simulation to plot. For types cumulative.diffs
and cumulative.abs.diffs
, fullsims
must be TRUE
in the dynardl
simulation
Value
a plot of the simulated dynardl model
Author(s)
Soren Jordan and Andrew Q. Philips
Examples
# Using the ineq data in dynamac
# Shocking Income Top 10
# Not run: simulations are time-intensive to estimate as an example
## Not run:
set.seed(1)
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", fullsims = TRUE)
# Shows absolute levels
dynardl.simulation.plot(ardl.model)
# Shows changes from mean level
dynardl.simulation.plot(ardl.model, response = "levels.from.mean")
# Same plot, but with spikeplot
dynardl.simulation.plot(ardl.model, type = "spike", response = "levels.from.mean")
# Grayscale plots
dynardl.simulation.plot(ardl.model, bw = TRUE)
## End(Not run)