On 02/27/2013 05:02 PM, Elias Teixeira Krainski wrote:
> How you construct the mesh?
I constructed it as following:
(thanks to Finn)
###import shape file with borders
grenzen.shp<-readShapePoly("./grenzen_shp.shp",proj4string=CRS("+init=epsg:3035"))
###transform CRS, for some reason could not directly assign the one I
wanted, so I took a projection of one of my covariates
grenzen.shp<-spTransform(grenzen.shp, CRS(projection(depth)))
grenzen <- inla.sp2segment(grenzen.shp)
mesh <- inla.mesh.create(loc=d0Prooi@coords,boundary=grenzen,
refine=list(max.edge=10000), plot.delay=1)
spde<-inla.spde.create(mesh)
###or this one
### spde <- inla.spde2.matern(mesh)
btw what is the difference between inla.spde.create and
inla.spde2.matern, if I specify model="matern" in the former function,
would it be equivalent to the latter?
Regards,
Olga