I noted a discrepancy in log-likelihoods (mrds vs mcds) for a half normal with no adjustments for the ducknest data; with MCDS producing an unreasonable result. I ran the model in question upon the nice data, turning on the debug argument, with these results
> duckhn0mcds <- ds(ducknest, key="hn", adjustment = "cos", nadj = 0, optimizer = "MCDS", debug_level = 3)
Fitting half-normal key function
DEBUG: initial values = -0.1866108
Running MCDS.exe...
Command file written to C:\Users\erexs\AppData\Local\Temp\RtmpCuKGTy\cmdtmp1f9448d5673b.txt
Stats file written to C:\Users\erexs\AppData\Local\Temp\RtmpCuKGTy\stat1f944220499a.txt
DEBUG: initial values = 4.78516
par = 4.78516
nll = 467.4962
par = 4.78516
nll = 467.4962
par = 4.78516
nll = 467.4962
par = 5.263676
nll = 467.4987
par = 4.306644
nll = 467.4897
par = 5.024418
nll = 467.4978
par = 4.545902
nll = 467.4938
par = 4.904789
nll = 467.4971
par = 4.665531
nll = 467.4951
par = 4.844974
nll = 467.4967
par = 4.725345
nll = 467.4957
DEBUG: Convergence!
Iteration 0.0
Converge = 0
nll = 467.4962
parameters = 4.7851599
MCDS.exe log likehood: -467.4962
MCDS.exe pars: 119.7205
mrds refitted log likehood: -467.4962451
mrds refitted pars: 4.7851599
Convergence was presumably achieved, but I don't understand the change in initial value of sigma from -0.187 to 4.785. From that (erroneous) initial value, the MCDS optimiser gets stuck around a local minima and produces an absurd estimate of sigma 4.785 (on a log scale), resulting in a P_a = 0.9999999.
Why should MCDS go so badly wrong on a simple model with lovely data?
As a comparison, I checked what happens when a single adjustment term for the same key is fitted to the same data
> duckhn1mcds <- ds(ducknest, key="hn", adjustment = "cos", nadj = 1, optimizer = "MCDS", debug_level = 3)
Fitting half-normal key function with cosine(2) adjustments
DEBUG: initial values = -0.1866108 0
Running MCDS.exe...
Command file written to C:\Users\erexs\AppData\Local\Temp\RtmpCuKGTy\cmdtmp1f94c0c32e2.txt
Stats file written to C:\Users\erexs\AppData\Local\Temp\RtmpCuKGTy\stat1f9421d679e6.txt
DEBUG: initial values = 0.9377312 -0.0219512
The initial values are not adjusted to such an extreme measure for this model and the resulting estimated parameters are reasonable.
I noted a discrepancy in log-likelihoods (mrds vs mcds) for a half normal with no adjustments for the ducknest data; with MCDS producing an unreasonable result. I ran the model in question upon the nice data, turning on the
debugargument, with these resultsConvergence was presumably achieved, but I don't understand the change in initial value of sigma from -0.187 to 4.785. From that (erroneous) initial value, the MCDS optimiser gets stuck around a local minima and produces an absurd estimate of sigma 4.785 (on a log scale), resulting in a P_a = 0.9999999.
Why should MCDS go so badly wrong on a simple model with lovely data?
As a comparison, I checked what happens when a single adjustment term for the same key is fitted to the same data
The initial values are not adjusted to such an extreme measure for this model and the resulting estimated parameters are reasonable.