Closed pbastide closed 3 years ago
PS: Here is a possible patch commit, that allows for named vectors for bounds and starting values.
Hi Paul,
It looks like when I add the code, I didn’t let the user to define the bounds for sigma^2_error. Thanks for upgrading this.
Best, Lam
Lam Ho | Assistant Professor FACULTY OF SCIENCE Department of Mathematics and Statistics 902.494.1069
Dalhousie University dal.ca
On Feb 22, 2021, at 9:29 AM, Paul Bastide notifications@github.com wrote:
PS: Here is a possible patch commit https://github.com/pbastide/phylolm/commit/b3787b6bc841d0e5a095519d273073edf67175a2, that allows for named vectors for bounds and starting values.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lamho86/phylolm/issues/38#issuecomment-783374004, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABW3HPZSYFK7CPJMD3WQDKLTAJL2TANCNFSM4YADCCEA.
Hi Lam,
Thank you for your answer, and for merging the change. I think it should solve the issue (see test file), so I'm closing this, but do not hesitate to check and warn me if you see any unexpected behavior.
Thanks, Paul
Hi,
I encountered a small unexpected behavior when trying to a lower value for the
sigma2_error
parameter.It seems that bounds or starting values on
sigma2_error
cannot be set. "Default" bounds are mentioned forsigma2_error/sigma2
in the doc, but apparently they cannot be over-written. If I try to set them, I get (rather uninformative) errors (see example below).From what I understood reading the code, the
lower.bound
andupper.bound
arguments inphylolm
are assumed to be a single value, that can only be used for the parameter to optimize (optpar
), and notsigma2_error
. Parameterstarting.value
does accept a list however, but the value onsigma2_error
seems to be ignored (from what I understood from l.130 of 'R/phylolm'.)I made a small local patch to allow for setting bounds on this
sigma2_error
parameter, I'm happy to do a PR if you want. The only thing is that the bounds are actually onsigma2_error/sigma2
(orsigma2_error/sigma2*2*alpha
for an OU).I hope this helps, and thanks for this great package !
Paul