Creates the design matrix necessary for fitting the GNAR model.
GNARdesign(vts = GNAR::fiveVTS, net = GNAR::fiveNet, alphaOrder = 2, betaOrder = c(1,1),
fact.var = NULL, globalalpha=TRUE, tvnets=NULL, netsstart=NULL)
returns a matrix containing (t-alphaOrder)nnodes
rows and a column for each parameter to be fitted. The columns are in time-lag order, eg for GNAR(2,[1,0]) the columns are alpha1
, beta1.1
, alpha2
. When a factor variable is specified the columns are labelled with the factor.
a matrix or ts object containing the multivariate time series to be modelled. The i,j
entry of this matrix should be for time i
and vertex/node j
.
the (first) network associated with the time series, containing a list with entries $edges
and $dist
. This network should have the same number of nodes as the number of columns of the vts
matrix.
a non-negative integer specifying the maximum time-lag to model.
a vector of length alphaOrder
specifying the maximum neighbour set to model at each of the time-lags.
a vector of factors indicating which nodes belong to each set with different parameters to be fitted.
a TRUE/FALSE value indivating whether to use global alpha parameters.
a list of additional networks. Currently only NULL (the static network case) is supported.
a vector of times corresponding to the first time points for each network of tvnets
. Currently only NULL (the static network case) is supported.
#Design matrix to fit GNAR(2,[1,1]) to the fiveVTS data
GNARdesign()
Run the code above in your browser using DataLab