1
$\begingroup$

I am modeling the diffusion of a technology product across space and time. I am hoping to model the interdependence and influence between geographies directly, and use the model to forecast future performance in specific geographies. I am a bit confused by the different terminologies (e.g. spatiotemporal model vs. spatial panel data, etc.), but the model I want to fit is

$$ Y_t = \lambda W Y_t + \phi Y_{t-1} + \theta W Y_{t-1} + X_t \beta + \epsilon_t $$

Where:

  • $W$ is the spatial weights matrix
  • $\lambda$ is contemporaneous spatial dependence
  • $\phi$ is temporal dependence / inertia
  • $\theta$ is temporally lagged spatial dependence
  • and $X_t$ and $\beta$ are the usual explanatory variables and their coefficients

The kicker is that I want to use custom weight matrices $W$ - i.e. be able to specify it directly as opposed to have it fall out of the coordinates of point-referenced data.

Many packages in R come very close to what I need, including spTimer, spBayes, stem and splm, but nothing quite exactly.

I was wondering if anyone knew of a package in R that can be used to fit these models. Would be highly appreciated.

$\endgroup$

1 Answer 1

1
$\begingroup$

To run these kind of models (e.g. with splm) and a custom weights matrix, you just need to create a custom neighbourhood weights listw object. This can be done using the glist parameter of the nb2listw function from the spdep package.

See Charles DiMaggio's Spatial Epidemiology Notes for an example of this.

$\endgroup$
2
  • $\begingroup$ that's really close, but unfortunately I haven't found the ability to estimate separate parameters for the spatial lag and the temporal lag. thank you tho! $\endgroup$
    – Tom
    Commented Oct 3, 2015 at 16:42
  • 2
    $\begingroup$ Ah, righto, I think I understand better now. Have you looked at the CarBayesST package? There are a multitude of complex models there - from memory there is one that suits your purposes... $\endgroup$
    – fmark
    Commented Oct 4, 2015 at 3:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.