aknandi / disaggregation

R package containing methods for Bayesian disaggregation modelling
Other
21 stars 6 forks source link

Do we want to more carefully seperate models with and without a field? #24

Closed timcdlucas closed 5 years ago

timcdlucas commented 5 years ago

in prepare_data we do:

  coords <- extractCoordsForMesh(covariate_rasters, covariate_data)

which will only every be used if we then fit a model with a field. And it's a bit slow.

But... maybe it's a small enough that it's better than accidentally making someone do the parallelExtract step twice. If they fit a no-field model then a field model maybe it was better to just have the coordinates ready in the first place.

timcdlucas commented 5 years ago

fit_model makes a bunch of spde objects and stuff as well. I guess it's all making the model objects quite large.

But an aside. Whenever I try to write out these disaggregation models without a field it looks like just mean of covariates within each polygon is the same as the full disaggregation model. Maybe only with a linear link, can't remember. So perhaps field = FALSE is only ever useful as the quick first model.

aknandi commented 5 years ago

I think it is ok that extractCoords is in prepare_data. As you say it would be odd to do disaggregation without a field.

timcdlucas commented 5 years ago

OK. That's fine then. I guess we just make it clear in the description that this is for geographic downscaling. Which it definitely is given the datastructures etc.