In this paper an impact analysis and its asymptotic inference are carried out for spatial autoregressive models in the cross-sectional and spatial-dynamic panel cases. The analysis is illustrated with a Monte Carlo study and an empirical application where the effects of some meteorological factors and air pollutants on an air quality index are studied. A supplementary material is also provided, where the authors show in detail the proofs of the mathematical results and some additional results of the Monte Carlo study and the empirical illustration. \par In the cross-sectional case, the Spatial Autoregressive (SAR) model given by $$ Y_n = \alpha_0\bold{1}_n +\lambda_0W_nY_n + \sum_{k=1}^K{\beta_{k0}X_{nk}} + \sum_{k=1}^K{\delta_{k0}X_{nk}} + \epsilon_n $$ is considered, where $n$ is the number of individuals, $Y_n$ is an $n\times 1$ vector of the dependent variable $Y$, $\bold{1}_n$ is an $n\times 1$ vector of ones, $W_n$ is the so-called spatial weights matrix of size $n\times n$, $X_{nk}$ is an $n\times 1$ vector of exogenous variables, $\alpha_0$ is a scalar, $\lambda_0$ is the scalar spatial autoregressive coefficient, $ \{\beta_{k0};k=1,\ldots,K \}$ and $ \{\delta_{k0}; k=1,\ldots,K \}$ determine the effects and the cross-neighbor effects of the exogenous variables $ \{X_{nk}; k=1,\ldots,K \}$, respectively, and $\epsilon_n$ $(n\times 1)$ is a white noise homoscedastic error term. \par Assuming that the matrix $I_n-\lambda_0W_n$ is invertible and by calculating the reduced form of the model, the authors obtain the expression of $\partial Y_n/\partial X_{nk}$, from which they deduce the direct feedback and indirect impacts of a change of $x_{jk}$ on $y_i$ for $i,j = 1, \ldots, n$, the total impact of a change of $x_{jk}$ for individual $j$ on all the $n$ individuals, and the averages direct feedback and indirect and total impacts. In addition, under some standard regularity conditions, they show how to make inference about these effects by applying the delta method, if the vector of parameters of the above SAR model are estimated using 2SLS, ML or GMM methods. \par In the spatial-dynamic panel case, the authors consider the Spatial~Dynamic Panel Data (SDPD) model given by $$ \multline Y_{nt} = \lambda_0W_nY_{nt} + \gamma_0Y_{n,t-1} + \rho_0W_nY_{n,t-1} \\+ \sum_{k=1}^K{\beta_{k0}X_{nk,t}} + \sum_{k=1}^K{\delta_{k0}W_nX_{nk,t}}+c_{n0} + \alpha_{0,t}\bold{1}_n + V_{n,t}, \endmultline $$ where $\gamma_0$ is a dynamic effect coefficient, $\rho_0$ is a spatial-dynamic coefficient, $Y_{n,t} = ( y_{1t}, \ldots, y_{nt} )^\top$ and $V_{n,t} = ( v_{1t}, \ldots, v_{n,t})^\top$ are $n\times 1$ column vectors, $v_{it}$ are i.i.d. across $i$ and $t$ with zero mean, $X_{nk,t}$ is an $n\times 1$ vector of nonstochastic regressors, $c_0$ is an ${n\times 1}$ column vector of individual effects, and $\alpha_{0,t}$ is a time effect. \par Using a similar method as in the cross-sectional case, the authors calculate $\partial\Bbb{E}(Y_{n,t})/\partial X_k$ where they consider that the regressors change by the same amount from period $t_1$ to $t_2$ where $t_1\leq t_2 \leq t$. In particular, they calculate the element-wise impact $\partial[\Bbb{E}(Y_{n,t})]_i/\partial x_{j,k,t_1}$, the average direct impact $\text{tr}[\partial\Bbb{E}(Y_{n,t})/\partial X_k]/n$, and the average indirect feedback and total effects. In addition, they show how to calculate these effects if we are interested in how a current change at time $t$ influences the future outcome at ${t+\tau}$. Finally, under some standard regularity conditions, they show how to make inference about these effects by applying the delta method, if the vector of parameters of the SDPD model, $\theta_0$, is estimated using an estimator, $\widehat{\theta}_n$, that verifies that $\sqrt{nT} (\widehat{\theta}_n - \theta_0 ) \to N (0,\Sigma_{\theta_0,nT} )$. \par Although the paper is very technical, it is an important practical contribution given the high generality level of the SAR and SDPD models in the study of spatial data. The Monte Carlo study carried out in the paper is very general and the results are adequate with a satisfactory finite-sample performance. Finally, the empirical example is very illustrative and gives an idea about the potential applicability of the results given in the paper.