Identify the optimal value of the penalty term for unmarked models that support penalized likelihood. For each potential value of the penalty term, K-fold cross validation is performed. Log-likelihoods for the test data in each fold are calculated and summed. The penalty term that maximizes the sum of the fold log-likelihoods is selected as the optimal value. Finally, the model is re-fit with the full dataset using the selected penalty term. Right now only Bayes-inspired penalty of Hutchinson et al. (2015) is supported.

Currently the only fitting function that supports optimizePenalty is occuMulti for multispecies occupancy modeling; see Clipp et al. (2021).

# S4 method for unmarkedFitOccuMulti
optimizePenalty(
  object, penalties = c(0, 2^seq(-4, 4)), k = 5, boot = 30, ...)

Arguments

object

A fitted model inheriting class unmarkedFit

penalties

Vector of possible penalty values, all of which must be >= 0

k

Number of folds to use for k-fold cross validation

boot

Number of bootstrap samples to use to generate the variance-covariance matrix for the final model.

...

Other arguments, currently ignored

Value

unmarkedFit object of same type as input, with the optimal penalty value applied.

References

Clipp, H. L., Evans, A., Kessinger, B. E., Kellner, K. F., and C. T. Rota. 2021. A penalized likelihood for multi-species occupancy models improves predictions of species interactions. Ecology.

Hutchinson, R. A., J. V. Valente, S. C. Emerson, M. G. Betts, and T. G. Dietterich. 2015. Penalized Likelihood Methods Improve Parameter Estimates in Occupancy Models. Methods in Ecology and Evolution. DOI: 10.1111/2041-210X.12368

Author

Ken Kellner contact@kenkellner.com