View source: R/score_test_nonlinpq_h0.R
score_test_nonlinpq_h0 | R Documentation |
Quasi score test for testing linearity of Poisson Network Autoregressive model
of order p
against the non-linear Intercep Drift (ID) version
(ID-PNAR(p
)).
score_test_nonlinpq_h0(b, y, W, p, d, Z = NULL)
b |
The estimated parameters from the linear PNAR model, in the following order:
(intercept, network parameters, autoregressive parameters, covariates).
The dimension of the vector should be |
y |
A |
W |
The |
p |
The number of lags in the model. |
d |
The lag parameter of non-linear variable (should be between 1 and |
Z |
An |
The function computes the quasi score test for testing linearity of Poisson Network Autoregressive model of order p
against 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 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}: \gamma=0
, versus the alternative H_{1}: \gamma >0
. The test statistic has the form
LM=S^{'}(\hat{\theta})\Sigma^{-1}(\hat{\theta})S(\hat{\theta}),
where
S(\hat{\theta})=\sum_{t=1}^{TT}\sum_{i=1}^{N}\left(\frac{Y_{i,t}}{\lambda_{i,t}(\hat{\theta})}-1\right)\frac{\partial\lambda_{i,t}(\hat{\theta})}{\partial\gamma}
is the partition of the quasi score related to the non-linear parameter \gamma
, evaluated at the estimated parameters \hat{\theta}
under the null assumption H_{0}
(linear model), and \Sigma(\hat{\theta})
is the variance of S(\hat{\theta})
. Under H_{0}
, the test asymptotically follows the \chi^2
distribution with 1 degree of freedom. For details see Armillotta and Fokianos (2023, Sec. 4).
A list with attribute class "htest" including:
statistic |
The value of the |
parameter |
The degrees of freedom of the |
p.value |
The p-value of the |
null.value |
The value of the |
alternative |
The alternative hypothesis, |
method |
The name of the test. |
data.name |
Information on the arguments used. |
Alternatively, these can be printed via the function summary.nonlin
.
Mirko Armillotta, Michail Tsagris and Konstantinos Fokianos.
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.
score_test_stnarpq_j, score_test_tnarpq_j,
lin_estimnarpq
data(crime)
data(crime_W)
mod1 <- lin_estimnarpq(crime, crime_W, p = 2)
ca <- mod1$coefs[, 1]
score_test_nonlinpq_h0(ca, crime, crime_W, p = 2, d = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.