Learn R Programming

fDMA (version 2.2.8)

plot.reg: Plots Selected Outcomes from reg Object.

Description

The function plots selected outcomes from reg object.

Usage

# S3 method for reg
plot(x,non.interactive=NULL, ...)

Value

Called for making a plot.

Arguments

x

an object of reg class

non.interactive

optional, logical, indicate whether plots should be made in non-interactive mode, by default non.interactive=FALSE, i.e., the user specifies in the interactive menu which plots will be made

...

not used

Details

After executing the command, the User is asked to choose

1 - for plotting actual and predicted values,

2 - for plotting residuals,

3 - for plotting regression coefficients on one plot,

4 - for plotting regression coefficients in separate png files, saved in the temporary directory, and moreover, to paste them into one big plot (also saved as a png file in the temporary directory),

5 - for plotting p-values for t-test of statistical significance for regression coefficients on one plot,

6 - for plotting p-values for t-test of statistical significance for regression coefficients in separate png files, saved in the temporary directory, and moreover, to paste them 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.

Examples

Run this code
# \donttest{
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

roll <- roll.reg(y=ld.wti,x=ld.drivers,window=100)

rec <- rec.reg(y=ld.wti,x=ld.drivers)

# graphics.off()
plot(roll,non.interactive=TRUE)

# graphics.off()
plot(rec,non.interactive=TRUE)
# }

Run the code above in your browser using DataLab