Description Usage Arguments Value Examples
This function simplifies working with onevariable models in, for example, fDMA
. It produces a matrix
corresponding to the set of models consisting of models with a constant and just one extra variable, and a model with a constant only.
1  onevar(x)

x 

matrix
,
inclusion of a variable is indicated by 1, omitting by 0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  ## Not run:
wti < crudeoil[1,1]
drivers < (lag(crudeoil[,1],k=1))[1,]
ld.wti < (diff(log(wti)))[1,]
ld.drivers < (diff(log(drivers)))[1,]
mds < diag(1,ncol(ld.drivers),ncol(ld.drivers))
mds < cbind(rep(1,ncol(ld.drivers)),mds)
mds < rbind(rep(0,ncol(mds)),mds)
mds[1,1] < 1
m1 < fDMA(y=ld.wti,x=ld.drivers,alpha=0.99,lambda=0.90,initvar=10,mods.incl=mds)
# Equivalently:
m2 < fDMA(y=ld.wti,x=ld.drivers,alpha=0.99,lambda=0.90,initvar=10,mods.incl=onevar(ld.drivers))
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.