Skip to main content
16 events
when toggle format what by license comment
Dec 1, 2012 at 20:43 comment added Macro Thanks for this suggestion @GavinSimpson, I actually came across this book recently. It has been very useful.
Oct 23, 2012 at 18:41 comment added Gavin Simpson @Marco I'd take a look at Simon Wood's book if you can as it has the details and cites the relevant literature on the smooths as random effects bit.
Oct 23, 2012 at 18:17 comment added Macro @GavinSimpson, nevermind, I found one :) In case you're curious: B.A. Brumback and J.A. Rice (1998). Smoothing spline models for the analysis of nested and crossed samples of curves (with discussion). Journal of the American Statistical Association 93, 961-994.
Oct 23, 2012 at 16:56 comment added Macro @GavinSimpson, I know your statement "here is a link between the penalised regression spline representation of s(x,y) in mgcv & a mixed effects model as the penalties on the smooth can be viewed as random effects." is correct but I'm having trouble finding a good reference for this. Do you know of one?
Sep 1, 2012 at 17:11 comment added Gavin Simpson @Macro If the spatial dependence is systematic in the sense that $E(y_i)$ varies with spatial location then it is perfectly reasonable to do as the OP suggests and model this dependence as a spatial trend surface. I admit I am not familiar with spatial random effects. There is a link between the penalised regression spline representation of s(x,y) in mgcv & a mixed effects model as the penalties on the smooth can be viewed as random effects.
Sep 1, 2012 at 16:51 comment added Michael R. Chernick @Macro The function s is suppose to model the interaction between the x and y coordinates. It is not simply an average. So it tells how the point (x$_1$,y$_1$) affects the value of the response surface at the point (x$_2$,y$_2$).
Sep 1, 2012 at 16:41 comment added Macro @GavinSimpson, for the record, I'm pretty certain that what the OP is proposing is a reasonable thing to do but I've never heard a formal argument for why modeling the spatial trend in the mean suffices to model spatial autocorrelation in the same way you can with a proper spatial random effects model. Simon Wood has mentioned on some R msg boards how this is equivalent to a random effects model, but no details are given. I think some indication of the connection is necessary to answer the question "Why does including latitude and longitude in a GAM account for spatial autocorrelation?".
Sep 1, 2012 at 16:39 comment added Gavin Simpson @Macro In the GAM, the s(x,y) is there to model the spatial dependence and hence, if successful, will leave the residuals i.i.d.
Sep 1, 2012 at 16:33 comment added Macro @Michael, surely you can see that making the lat/long coordinates affect the mean is different from modeling the correlations between two points in space ... The OP asked how to model spatial autocorrelation and I think part of the argument - the part that explains exactly how fitting a smooth spatial surface (which is what a generalized additive model in the coordinates would do) models the spatial autocorrelation. There is a relationship between gams and covariance functions (I don't know enough to be more precise) but appealing to that relationship seems to be what is required here.
Sep 1, 2012 at 16:30 comment added Michael R. Chernick @Macro I don't see what is missing from the answer. I don't think the smoothness of the function has anything to do with it. It is just that a function that relates one point in the x-y plane with others determines the spatial correlations.
Sep 1, 2012 at 15:35 comment added Macro @Michael, spatial autocorrelation means that the correlation between points depends on their spatial locations. I think this answer would be more useful if you could explain why using a smooth function estimate, with the spatial locations as inputs, accounts for this. On the surface, it seems that the smooth function approach models the mean while spatial autocorrelation refers to the covariance structure. I know there is a relationship between the covariance function of a smooth process and smooth function estimation but, without making that connection, this answer seems incomplete.
Sep 1, 2012 at 15:20 comment added Michael R. Chernick The terms in the model enter into the calculation of the spatial correlations. The model determines them.
Sep 1, 2012 at 15:09 comment added gisol So if in model B the deviance explained by the x,y term is large, does this mean there's a large amount of spatial autocorrelation, or is the spatial autocorrelation 'accounted for', and the explanatory effect comes from environmental effects that correlate geographically?
Sep 1, 2012 at 14:59 comment added Michael R. Chernick I think that if there is no interaction term in the model the spatial autocorrelation between neighboring points is 0. When you have an iteraction term, that term determines the value of the spatial autocorrelations.
Sep 1, 2012 at 14:53 comment added gisol Hi Michael, thanks for the response. I think I understand what you've said, but it seems to be a description of spatial autocorrelation rather than how the coordinates inclusion accounts for it - I may be missing your point though. For example, say I have 2 models, the first (A) with a single term - deforestation as a function of the distance to a capital city, and the second (B) with the distance to capital city term but also the lat and long term. Would you mind reiterating your answer in this context? Perhaps I could understand it better.
Sep 1, 2012 at 14:36 history answered Michael R. Chernick CC BY-SA 3.0