View source: R/plot.grid.roll.reg.R
| plot.grid.roll.reg | R Documentation |
grid.roll.reg Function.The function plots selected outcomes from grid.roll.reg.
## S3 method for class 'grid.roll.reg'
plot(x,non.interactive=NULL, ...)
x |
an object of |
non.interactive |
optional, |
... |
not used |
After executing the command, the User is asked to choose
1 - for plotting Root Mean Squared Error (RMSE) for all estimated models,
2 - for plotting Mean Absolute Error (MAE) for all estimated models,
3 - for plotting coefficients (including constant) for all estimated models, the outcomes are saved in separate png files in the temporary directory, and additionally, plots for different variables are collected into one big plot (also saved as a png file in the temporary directory),
4 - for plotting p-values for t-test of statistical significance for regression coefficients for all estimated models, the outcomes are saved in separate png files in the temporary directory, and additionally, plots for different variables are collected into one big plot (also saved as a png file in the temporary directory),
Chosing 0 exits the plot command.
If non.interactive=TRUE all the above plots are made.
Called for making a plot.
It is suggested to execute graphics.off before exectuing plot command for grid.roll.reg object. However, the User should take care to save all other plots before executing this command, as they can be lost.
If graphics.off is not executed before plotting grid.roll.reg object, sometimes a legend might cover the important parts of the plot.
wti <- crudeoil[-1,1]
drivers <- (lag(crudeoil[,-1],k=1))[-1,]
ld.wti <- (diff(log(wti)))[-1,]
ld.drivers <- drivers[-1,]
ld.drivers[,c(4,6)] <- (diff(drivers[,c(4,6)]))[-1,]
ld.drivers[,c(1:2,5,7)] <- (diff(log(drivers[,c(1:2,5,7)])))[-1,]
ld.drivers[,c(3,6)] <- ld.drivers[,c(3,6)]/100
grw <- c(50,100,150)
g <- grid.roll.reg(y=ld.wti,x=ld.drivers,grid.window=grw)
plot(g,non.interactive=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.