DistanceDevelopment / mrds

R package for mark-recapture-distance-sampling analysis
GNU General Public License v3.0
4 stars 4 forks source link

Monotonicity constraint consistency between `mrds` and Distance for Windows #62

Open dill opened 2 years ago

dill commented 2 years ago

Per discussion here:

@lenthomas:

"Regarding the points at which to check for constraints, do you think I should change mcds.exe so that it also takes account of left truncation? It makes sense to me, as g(x) for 0 >= x >= [left trucation point] should be 0 when it comes to things like calculating average p so no point in checking for non-monotonicity there."

and

"[in mrds] there is a monotonicity check at 20 evenly spaced points between the left and right truncation points. This seems inconsistent with the constrained optimization that is done, where monotonicity is checked at 10 non-evenly spaced points between left and right truncation. Shouldn't these be consistent?"

dill commented 2 years ago

Check FORTRAN code, see if R does the same.

lenthomas commented 1 year ago

Decision at May 3rd Dist Dev meeting is to make the two consistent; we didn't finalize which to change, but it seems to make more sense a priori to have more constraint points rather than fewer. If this is an mrds change it may warrant a minor version bump rather than a patch - so I assigned to 2.4.0.