grid.roll.reg {fDMA} | R Documentation |
Computes roll.reg
Function for Multiple Values of window
.
Description
Sometimes it is necessary to consider various values of parameter window
in Rolling Regression. This function computes roll.reg
function for all values of window
for a given grid.
This function is a wrapper of roll.reg
.
Usage
grid.roll.reg(y,x=NULL,grid.window,parallel.grid=NULL,c=NULL)
Arguments
y |
see |
x |
see |
grid.window |
a numeric |
parallel.grid |
optional, |
c |
optional, see |
Value
an object of class grid.roll.reg
, list
of
$models |
|
$fq |
|
See Also
print.grid.roll.reg
, summary.grid.roll.reg
, plot.grid.roll.reg
.
Examples
wti <- crudeoil[-1,1]
drivers <- (lag(crudeoil[,-1],k=1))[-1,]
ld.wti <- (diff(log(wti)))[-1,]
ld.drivers <- (diff(log(drivers)))[-1,]
grw <- c(50,100,150)
g <- grid.roll.reg(y=ld.wti,x=ld.drivers,grid.window=grw)
# extract model with window=100
model <- g$models[[2]]
[Package fDMA version 2.2.7 Index]