I implemented (and pushed) a new class. Sorry for not branching first but anyway….
The idea is that all calculations of prior probabilities and all generation of random variables from prior distributions should be handled by a special class, Prior. This makes it much easier to change the details of prior distributions etc without worrying about the details within class Model and TraitModel.
In Model, there is a reference to class prior called cprior.
I have not finished implementing this. Now, it only works for prior calculations in Model (not traitModel) and only in the following functions:
I implemented (and pushed) a new class. Sorry for not branching first but anyway….
The idea is that all calculations of prior probabilities and all generation of random variables from prior distributions should be handled by a special class, Prior. This makes it much easier to change the details of prior distributions etc without worrying about the details within class Model and TraitModel.
In Model, there is a reference to class prior called cprior.
I have not finished implementing this. Now, it only works for prior calculations in Model (not traitModel) and only in the following functions:
updateLambdaInitMH updateLambdaShiftMH updateMuInitMH updateMuShiftMH updateEventRateMH computeLogPrior
any calculations involving priors not in those fxns need updated
I tested it though fixing random seed and it gives identical results to the previous version