plot.FCVAR_grid {FCVAR} | R Documentation |
Plot the Likelihood Function for the FCVAR Model
Description
plot.FCVAR_grid
plots the likelihood function from FCVARlikeGrid
.
FCVARlikeGrid
performs a grid-search optimization
by calculating the likelihood function
on a grid of candidate parameter values.
This function evaluates the likelihood over a grid of values
for c(d,b)
(or phi
, when there are constraints on c(d,b)
).
It can be used when parameter estimates are sensitive to
starting values to give an approximation of the global max which can
then be used as the starting value in the numerical optimization in
FCVARestn
.
Usage
## S3 method for class 'FCVAR_grid'
plot(x, y = NULL, ...)
Arguments
x |
An S3 object of type |
y |
An argument for generic method |
... |
Arguments to be passed to methods, such as graphical parameters for the generic plot function. |
Note
Calls graphics::persp
when x$Grid2d == TRUE
and
calls graphics::plot
when x$Grid2d == FALSE
.
See Also
FCVARoptions
to set default estimation options.
plot.FCVAR_grid
plots the likelihood function from FCVARlikeGrid
.
Other FCVAR auxiliary functions:
FCVARforecast()
,
FCVARlikeGrid()
,
FCVARsimBS()
,
FCVARsim()
,
FracDiff()
Examples
opt <- FCVARoptions()
opt$dbStep1D <- 0.1 # Coarser grid for plotting example.
opt$dbStep2D <- 0.2 # Coarser grid for plotting example.
opt$gridSearch <- 0 # Disable grid search in optimization.
opt$dbMin <- c(0.01, 0.01) # Set lower bound for d,b.
opt$dbMax <- c(2.00, 2.00) # Set upper bound for d,b.
opt$constrained <- 0 # Impose restriction dbMax >= d >= b >= dbMin ? 1 <- yes, 0 <- no.
x <- votingJNP2014[, c("lib", "ir_can", "un_can")]
opt$progress <- 2 # Show progress report on each value of b.
likeGrid_params <- FCVARlikeGrid(x, k = 2, r = 1, opt)
graphics::plot(likeGrid_params)