DistanceDevelopment / DSsim

Distance Sampling Simulation R Package
1 stars 1 forks source link

Add mono.strict=TRUE option for ds models #49

Closed LHMarshall closed 3 years ago

LHMarshall commented 6 years ago

For models where there are no covariates but there are adjustment terms it is worth setting mono.strict = TRUE

LHMarshall commented 6 years ago

A user was fitting models using adustment terms (e.g. hazard rate + herm order 4 adjustment) this gave rise to unstable models and inaccurate results. As a result a better warning and error recording procedure has been implemented (previously very few warnings or errors if any were provided to the user). The user is now able to see that the models are having problems during the fitting process. In the future this will be improved further by allowing the user to specify additional fitting options such as mono.strict = TRUE.

> my.simulation.subjective.run <- run(my.simulation.subjective.100)
 4  out of  4  reps 
simpleWarning in optimx.check(par, optcfg$ufn, optcfg$ugr, optcfg$uhess, lower, : Parameters or bounds appear to have different scalings.
  This can cause poor performance in optimization. 
  It is important for derivative free methods like BOBYQA, UOBYQA, NEWUOA.
  (occured  1  times)
simpleWarning in FUN(newX[, i], ...): Detection function is less than 0 at some distances
  (occured  1  times)
simpleWarning in flpt.lnl(fpar, ddfobj, misc.options): 
 Problems with integration. integral <=0. Setting integral to 1E-25

  (occured  1  times)
simpleWarning in FUN(newX[, i], ...): Detection function is greater than 1 at some distances
  (occured  1  times)
...
Estimates of Abundance (N)

  Truth mean.Estimate percent.bias         RMSE CI.coverage.prob      mean.se  sd.of.means
1  9090   1.18915e+14 1.308196e+12 2.378301e+14             0.75 4.039839e+12 2.378301e+14
LHMarshall commented 3 years ago

Will not be added to DSsim but noted to implement in dsims when adjustment terms are added