Closed Serra314 closed 1 year ago
The covariate errors should be fixed in the devel version (checked 2020-10-29) but you will need to specify the integration function domain with domain = list(coordinates = mesh)
ff <- lgcp(components = cmp,
formula = coordinates ~ Intercept + fault_dist,
data = points.df,
samplers = boundary,
domain = list(coordinates = mesh))
The code relating to names of coordinate dimensions still needs to be overhauled in inlabru.
With sp being phased out in favour of sf that doesn't have configurable coordinate names, the coordinate naming issue will not be fixed for sp objects. One needs to use something like
coordinates(.data.)[,1]
and
st_coordinates(.data.)[,"X"]
to access individual coordinate values.
There are two problems showed in this document: 1) if a define a function of the coordinates as model component, then, the coordinates of my data has to be called x and y 2) the second one is that when using a 2D SPDE random effect + covariate based on a function of the point coordinate it returns an error
the code simulate some points uniformly in (0,1), the covariate is the distance between a point and a line, it is used finding the distance from the line of the mesh points and projecting them to the new locations.
Created on 2020-05-25 by the reprex package (v0.3.0)