GNARdesign: Function to create the GNAR design matrix

GNARdesignR Documentation

Function to create the GNAR design matrix

Description

Creates the design matrix necessary for fitting the GNAR model.

Usage

GNARdesign(vts = GNAR::fiveVTS, net = GNAR::fiveNet, alphaOrder = 2, betaOrder = c(1,1),
 fact.var = NULL, globalalpha=TRUE, tvnets=NULL, netsstart=NULL)

Arguments

vts

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.

net

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.

alphaOrder

a non-negative integer specifying the maximum time-lag to model.

betaOrder

a vector of length alphaOrder specifying the maximum neighbour set to model at each of the time-lags.

fact.var

a vector of factors indicating which nodes belong to each set with different parameters to be fitted.

globalalpha

a TRUE/FALSE value indivating whether to use global alpha parameters.

tvnets

a list of additional networks. Currently only NULL (the static network case) is supported.

netsstart

a vector of times corresponding to the first time points for each network of tvnets. Currently only NULL (the static network case) is supported.

Value

GNARdesign

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.

Examples

#Design matrix to fit GNAR(2,[1,1]) to the fiveVTS data
GNARdesign()

GNAR documentation built on April 28, 2023, 1:12 a.m.

Related to GNARdesign in GNAR...