diff options
author | lpautrel <lea.pautrel@terroiko.fr> | 2023-12-12 15:55:40 +0100 |
---|---|---|
committer | lpautrel <lea.pautrel@terroiko.fr> | 2023-12-12 15:55:40 +0100 |
commit | 8c8fd4163236534985ade87518543b1ca374e262 (patch) | |
tree | 943dd575a7e9035127c87b031beb3fd7f124611e | |
parent | d84721713daf348739152d8c6cf4a5b1772713eb (diff) |
Rename get.NLL.params to return.negloglik
-rw-r--r-- | R/occuCOP.R | 4 | ||||
-rw-r--r-- | man/occuCOP.Rd | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/R/occuCOP.R b/R/occuCOP.R index f5aff19..63480f4 100644 --- a/R/occuCOP.R +++ b/R/occuCOP.R @@ -52,8 +52,7 @@ setClass( ## unmarkedFitCOP class ---- setClass("unmarkedFitCOP", representation(removed_obs = "matrix", - formlist = "list", - convergence = "optionalNumeric"), + formlist = "list"), contains = "unmarkedFit") @@ -959,7 +958,6 @@ occuCOP <- function(data, opt = opt, negLogLike = opt$value, nllFun = nll, - convergence = opt$convergence, TMB = tmb_mod ) diff --git a/man/occuCOP.Rd b/man/occuCOP.Rd index aba49e3..03f58df 100644 --- a/man/occuCOP.Rd +++ b/man/occuCOP.Rd @@ -34,7 +34,7 @@ occuCOP(data, \item{na.rm}{Logical specifying whether to fit the model (\code{na.rm=TRUE}) or not (\code{na.rm=FALSE}) if there are NAs in the \code{\link{unmarkedFrameCOP}} object.} - \item{return.negloglik}{A list of vectors of parameters (\code{c(psiparams, lambdaparams)}). If specified, the function will not maximise likelihood but return the negative log-likelihood for the those parameters. See an example below.} + \item{return.negloglik}{A list of vectors of parameters (\code{c(psiparams, lambdaparams)}). If specified, the function will not maximise likelihood but return the negative log-likelihood for the those parameters in the \code{nll} column of a dataframe. See an example below.} \item{L1}{Logical specifying whether the length of observations (\code{L}) are purposefully set to 1 (\code{L1=TRUE}) or not (\code{L1=FALSE}).} @@ -50,7 +50,7 @@ occuCOP(data, \subsection{The COP occupancy model}{ \code{occuCOP} fits a single season occupancy model using count data, as described in Pautrel et al. (2023). - + The \strong{occupancy sub-model} is: \deqn{z_i \sim \text{Bernoulli}(\psi_i)}{z_i ~ Bernoulli(psi_i)} @@ -237,7 +237,7 @@ print(occuCOP(data = umf, engine = "R", psistarts = 0, lambdastarts = 0)@nllFun) # Finally, if you do not want to fit your model but only get the likelihood, # you can get the negative log-likelihood for a given set of parameters. -occuCOP(data = umf, get.NLL.params = list( +occuCOP(data = umf, return.negloglik = list( c("psi" = qlogis(0.25), "lambda" = log(2)), c("psi" = qlogis(0.5), "lambda" = log(1)), c("psi" = qlogis(0.75), "lambda" = log(0.5)) |