You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usually model.data does not depend on the parameters; it's just the data. However, that's not the case for the PGLS fits, where we care about the residuals. This is fine and easy for ML fits, and I have written a residuals method in diversitree that will get this for us.
However, for Bayesian fits, we will need to get new data for every sample that we care about.
Within as.unit.tree.mcmcsamples, produces a multiPhylo object along the samples, so the high level interface will work fine. However, this function currently works by a single call to model.info which produces a single data object, and then going through make.model.phylo, which assumes that the data object is scalar.
I see two options
Define a new as.unit.tree.mcmcsamples.pgls (cumbersome, but that is the full method name!)
Set things up to work with non-scalar 'data' objects.
There are plusses and negatives to both. If we take the first route then the bits around sampling from the mcmc object need to abstracted or duplicated anyway. If we take the second, then the design gets more complicated if this is only going to affect a single type of fit.
Something to think about.
The text was updated successfully, but these errors were encountered:
personally i am in favor of option (1) as i think this way it will be simpler for people to add additional model.data objects for new models. prefer just to make things more complex for special cases but am open to being swayed on this if you are in favor of (2)
I may be wrong in some of the logic here...
Usually
model.data
does not depend on the parameters; it's just the data. However, that's not the case for the PGLS fits, where we care about the residuals. This is fine and easy for ML fits, and I have written aresiduals
method in diversitree that will get this for us.However, for Bayesian fits, we will need to get new data for every sample that we care about.
Within
as.unit.tree.mcmcsamples
, produces amultiPhylo
object along the samples, so the high level interface will work fine. However, this function currently works by a single call tomodel.info
which produces a single data object, and then going throughmake.model.phylo
, which assumes that the data object is scalar.I see two options
as.unit.tree.mcmcsamples.pgls
(cumbersome, but that is the full method name!)There are plusses and negatives to both. If we take the first route then the bits around sampling from the mcmc object need to abstracted or duplicated anyway. If we take the second, then the design gets more complicated if this is only going to affect a single type of fit.
Something to think about.
The text was updated successfully, but these errors were encountered: