Global optimization of the linearity test statistic for the Smooth Transition Poisson Network Autoregressive model of order \(p\) with \(q\) covariates (ST-PNAR(\(p\))) with respect to the nuisance scale parameter \(\gamma\).
global_optimise_LM_stnarpq(gama_L = NULL, gama_U = NULL, len = 10, b, y, W,
p, d, Z = NULL, tol = 1e-9)
A list including:
The optimum value of the \(\gamma\) parameter.
The value of the objective function at the optimum.
A vector with the extremes points of sub-intervals.
The lower value of the \(\gamma\) values to consider. Use NULL if there is not information about its value. See the details for default computation.
The upper value of the \(\gamma\) values to consider. Use NULL if there is not information about its value. See the details for default computation.
The number of increments to consider for the \(\gamma\) parameter.
The estimated parameters from the linear model, in the following order: (intercept, network parameters, autoregressive parameters, covariates). The length of the vector should be \(2p + 1 + q\), where \(q\) denotes the number of covariates.
A \(TT \times N\) time series object or a \(TT \times N\) numerical matrix with the \(N\) multivariate count time series over \(TT\) time periods.
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.
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.
Tolerance level for the optimizer.
Mirko Armillotta, Michail Tsagris and Konstantinos Fokianos.
The function optimizes the quasi score test statistic, under the null assumption of linearity, for testing linearity of Poisson Network Autoregressive model of order \(p\) against the following ST-PNAR(\(p\)) model, with respect to the unknown nuisance parameter (\(\gamma\)). For each node of the network \(i=1,...,N\) over the time sample \(t=1,...,TT\) $$ \lambda_{i,t}=\beta_{0}+\sum_{h=1}^{p}(\beta_{1h}X_{i,t-h}+\beta_{2h}Y_{i,t-h}+\alpha_{h}e^{-\gamma X_{i,t-d}^{2}}X_{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 sequence \(\lambda_{i,t}\) is the expectation of \(Y_{i,t}\), conditional to its past values.
The null hypothesis of the test is defined as \(H_{0}: \alpha_{1}=...=\alpha_{p}=0\), versus the alternative that at least one among \(\alpha_{h}\) is not 0. The test statistic has the form $$ LM(\gamma)=S^{'}(\hat{\theta},\gamma)\Sigma^{-1}(\hat{\theta},\gamma)S(\hat{\theta},\gamma) $$ where $$ S(\hat{\theta},\gamma)=\sum_{t=1}^{TT}\sum_{i=1}^{N}\left(\frac{Y_{i,t}}{\lambda_{i,t}(\hat{\theta},\gamma)}-1\right) \frac{\partial\lambda_{i,t}(\hat{\theta},\gamma)}{\partial\alpha} $$ is the partition of the quasi score related to the vector of non-linear parameters \(\alpha=(\alpha_{1},...,\alpha_{p})\), evaluated at the estimated parameters \(\hat{\theta}\) under the null assumption \(H_{0}\) (linear model) and \(\Sigma(\hat{\theta},\gamma)\) is the variance of \(S(\hat{\theta},\gamma)\).
The optimization employes the Brent algorithm (Brent, 1973) applied in the interval from gama_L
to gama_U
. To be sure that the global optimum is found, the optimization is performed at (len
-1) consecutive equidistant sub-intervals and then the maximum over them is taken as global optimum.
The values of gama_L
and gama_U
are computed internally as gama_L
\(=-\log(0.9)/X^{2}\) and gama_U
\(=-\log(0.1)/X^{2}\), where \(X\) is the overall mean of \(X_{i,t}\) over the nodes \(i=1,...,N\) and times \(t=1,...,TT\). Since the non-linear function \(e^{-\gamma X_{i,t-d}^{2}}\) ranges between 0 and 1, by considering \(X\) to be a representative value for the network mean, gama_U
and gama_L
would be the values of \(\gamma\) leading the non-linear switching function to be 0.1 and 0.9, respectively, so that in the optimization procedure the extremes of the function domain are excluded. Alternatively, their value can be supplied by the user. For details see Armillotta and Fokianos (2023, Sec. 4-5).
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.
Brent, R. (1973) Algorithms for Minimization without Derivatives. Prentice-Hall, Englewood Cliffs N.J.
score_test_stnarpq_j, global_optimise_LM_tnarpq,
score_test_tnarpq_j
data(crime)
data(crime_W)
mod1 <- lin_estimnarpq(crime, crime_W, p = 1)
b <- mod1$coefs[, 1]
global_optimise_LM_stnarpq(b = b, y = crime, W = crime_W, p = 1, d = 1)
Run the code above in your browser using DataLab