Hi mkeintz, Thank you for your response. Indeed I am looking for the spatial analog of autocorrelation. And I am only looking to control for (or eliminate) such impact in order to correctly assess the effect of X on Y. I am not interested in the pattern of spatial covariance per se. I think what you are proposing is that I include a weighted sum of Y_m' as a predictor in the model for Y_m, where m' are markets in the neighborhood of market m. I was hoping that I could achieve this outcome by allowing the errors from a model without such predictors to be correlated based on the spatial location of the market. And I thought that is what Proc Mixed allowed via the TYPE = SP option. And the different types of spatial covariance structures (e.g. EXP, LIN, etc.) allowed different relationships between distance between markets and the strength of the correlation between their errors. If that is not so, then what does such a covariance matrix represent? Re: How do I model a Spatial Covariance structure for panel data in Proc Mixed? I'm not even sure you would get spatial covariance use lat/long, regardless of the nonpositive definite matrix. Just specifying lat/long menas you think there is an east/west or north/south (or combination) trend over your study region. But aren't you really interested in the spatial analog of serial autocorrelation? I mean, isn't it "economic distance from competing/cooperationg markets" that you care about? I don't know if you're really interested in estimating the impact of other markets, or just eliminating that impact to assess other relations, but I don't see how lat/long will help with either objective. Without getting into robust spatial analysis (see https://support.sas.com/rnd/app/stat/procedures/SpatialAnalysis.html), I think you're just trying to get the impact of distance from other markets on each given market. Or more likely, just the impact of the nearest markets. I'm just speculating here, but ... If you believe that influence decays with distance (and probably distance-squared as in a gravity model), why not simplify and get the most important part? That is generate, for each market, a weighted sum of relevant values for all other markets within a given distance, i.e. within a suitably small circle. You could probably get a second group of intermediate distance markets as well if you think they could be relevant. This approach, of course, assumes that your markets are on a " homogeneous transport plane" (i.e. symmetric and a given distance (e.g. 20 miles) has the same impact in densely populated regions as sparsely positive). If the fixed-size circle technique leaves some markets without a competitor market, or you don't like the homogeneous distance implication, then perhaps you can just take the closest 1 or 2 competitors to each of your markets. That would presumably capture the most relevent spatial interactions. And it kind-of assumes that spatial competition has already generated nearest neighbors at the economically relevant distance, regardless of actual mileage. At least this approach would unburden you of the fixed lat/long values for each market.
... View more