  This paper considers a class of GMM estimators for general dynamic panel
models, allowing for weakly exogenous covariates and cross sectional dependence
due to spatial lags, unspecified common shocks and time-varying interactive
effects. We significantly expand the scope of the existing literature by
allowing for endogenous spatial weight matrices without imposing any
restrictions on how the weights are generated. An important area of application
is in social interaction and network models where our specification can
accommodate data dependent network formation. We consider an exemplary social
interaction model and show how identification of the interaction parameters is
achieved through a combination of linear and quadratic moment conditions. For
the general setup we develop an orthogonal forward differencing transformation
to aid in the estimation of factor components while maintaining orthogonality
of moment conditions. This is an important ingredient to a tractable asymptotic
distribution of our estimators. In general, the asymptotic distribution of our
estimators is found to be mixed normal due to random norming. However, the
asymptotic distribution of our test statistics is still chi-square.
