Re: [R] MRF smoothers in MGCV - specifying neighbours

2014-05-08 Thread Simon Wood
Hi Mark, The problem here is that the constructor expects there to be at least one observation per location. The nb.l list has neighbourhood information for 166 locations, while the 'obs' data contains observations for only 99 of them (unique(obs$xy.idx)). The solution probably requires more

Re: [R] MRF smoothers in MGCV - specifying neighbours

2014-05-08 Thread Mark Payne
Hi Roger and Simon, Thanks for the replies. Simon's suggestion of an isolated or missing neighbourhood doesn't hold either. I've attached the code below - its my attempt to solve the FELSPLINE sausage using mrf rather than a soap smoother. Its a bit convoluted, but should run ok. I thought this w

Re: [R] MRF smoothers in MGCV - specifying neighbours

2014-05-08 Thread Simon Wood
Hi Mark, I'm not sure what is happening here - there is no chance that nb.l contains a neighbourhood not in the levels of obs$xy.idx, I suppose? i.e. is all(names(nb.l)%in%levels(obs$xy.idx)) also TRUE? Here is some code illustrating what nb should look like (and in response to Roger Bivand

Re: [R] MRF smoothers in MGCV - specifying neighbours

2014-05-08 Thread Roger Bivand
Mark Payne gmail.com> writes: > > Hi, > > Does anyone have an example of a Markov Random Field smoother (MRF) in MGCV > where they have specified the neighbourhood directly, rather than supplying > polygons? Does anyone understand how the rules should be? Based on the > columb example, I have s

[R] MRF smoothers in MGCV - specifying neighbours

2014-05-07 Thread Mark Payne
Hi, Does anyone have an example of a Markov Random Field smoother (MRF) in MGCV where they have specified the neighbourhood directly, rather than supplying polygons? Does anyone understand how the rules should be? Based on the columb example, I have setup my data set and neighbourhood like so: >