Generation of counts from a non-linear Intercept Drift Poisson Network Autoregressive model of order \(p\) with \(q\) covariates (ID-PNAR(\(p\))).
poisson.MODpq.nonlin(b, W, gama, p, d, Z = NULL, TT, N, copula = "gaussian",
corrtype = "equicorrelation", rho, dof = 1)
A list including:
The Toeplitz correlation matrix, if employed in the copula or NULL else.
A \(TT \times N\) time series object matrix of simulated Poisson means for \(N\) time series over \(TT\).
A \(TT \times N\) time series object matrix of simulated counts for \(N\) time series over \(TT\).
The linear coefficients of the model, in the following order: (intercept, network parameters, autoregressive parameters, covariates). The dimension of the vector should be \(2p + 1 + q\), where \(q\) denotes the number of covariates.
The \(N \times N\) row-normalized non-negative adjacency matrix describing the network. The main diagonal entries of the matrix should be zeros, all the other entries should be non-negative and the maximum sum of elements over the rows should equal one. The function row-normalizes the matrix if a non-normalized adjacency matrix is provided.
A scalar non-linear intercept drift parameter.
The number of lags in the model.
The lag parameter of non-linear variable (should be between 1 and \(p\)).
An \(N \times q\) matrix of covariates (one for each column), where \(q\) is the number of covariates in the model. Note that they must be non-negative.
The temporal sample size.
The number of nodes on the network.
Which copula function to use? The "gaussian", "t", or "clayton".
The value of the copula parameter (\(\rho\)). A scalar in \([-1,1]\) for elliptical copulas (Gaussian, t), a value greater than or equal to -1 for Clayton copula.
Used only for elliptical copulas. The type of correlation matrix employed for the copula; it will either be the "equicorrelation" or "toeplitz". The "equicorrelation" option generates a correlation matrix where all the off-diagonal entries equal \(\rho\). The "toeplitz" option generates a correlation matrix whose generic off-diagonal \((i,j)\)-element is \(\rho^{|i-j|}\).
The degrees of freedom for Student's t copula.
Mirko Armillotta, Michail Tsagris and Konstantinos Fokianos.
This function generates counts from a non-linear Intercept Drift Poisson NAR(\(p\)) model, where \(q\) non time-varying covariates are allowed as well. The counts are simulated from \(Y_{t}=N_{t}(\lambda_{t})\), where \(N_{t}\) is a sequence of \(N\)-dimensional IID Poisson count processes, with intensity 1, and whose structure of dependence is modelled through a copula construction \(C(\rho)\) on their associated exponential waiting times random variables. For details see Armillotta and Fokianos (2024, Sec. 2.1-2.2). The sequence \(\lambda_{i,t}\) is the expecation of \(Y_{i,t}\), conditional to its past values and it is generated by means of the following ID-PNAR(\(p\)) model. For each node of the network \(i=1,...,N\) over the time sample \(t=1,...,TT\) $$ \lambda_{i,t}=\frac{\beta_{0}}{(1+X_{i,t-d})^{\gamma}}+\sum_{h=1}^{p}(\beta_{1h}X_{i,t-h}+\beta_{2h}Y_{i,t-h})+\sum_{l=1}^{q}\delta_{l}Z_{i,l} $$ where \(X_{i,t}=\sum_{j=1}^{N}W_{ij}Y_{j,t}\) is the network effect, i.e. the weighted average impact of node \(i\) connections, with the weights of the mean being \(W_{ij}\), the single element of the network matrix \(W\).
The parameter \(\beta_{0}\) is the intercept of the model, \(\beta_{1h}\) are the network coefficients, \(\beta_{2h}\) are the autoregressive parameters, \(\gamma\) is the non-linear coefficient associated with the intercept drift, and \(\delta_{l}\) are the coefficients assocciated with the covariates \(Z_{i,l}\). The coefficient \(d\) is considered as an extra parameter defining the lag of the network effect in the non-linear part of the model and is left to be set by the user. For details on ID-PNAR models see Armillotta and Fokianos (2023, Sec. 2).
Armillotta, M. and K. Fokianos (2023). Nonlinear network autoregression. Annals of Statistics, 51(6): 2526--2552.
Armillotta, M. and K. Fokianos (2024). Count network autoregression. Journal of Time Series Analysis, 45(4): 584--612.
Armillotta, M., Tsagris, M. and Fokianos, K. (2024). Inference for Network Count Time Series with the R Package PNAR. The R Journal, 15/4: 255--269.
poisson.MODpq, poisson.MODpq.log,
poisson.MODpq.stnar, poisson.MODpq.tnar
W <- adja( N = 20, K = 5, alpha= 0.5)
y <- poisson.MODpq.nonlin( b = c(0.5, 0.3, 0.2), W = W, gama = 1, p = 1,
d = 1, Z = NULL, TT = 1000, N = 20, copula = "gaussian",
corrtype = "equicorrelation", rho = 0.5)$y
Run the code above in your browser using DataLab