nLogLike_rcpp: Negative log-likelihood

Description Usage Arguments Value

View source: R/RcppExports.R

Description

Computation of the negative log-likelihood (forward algorithm - written in C++)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
nLogLike_rcpp(
  nbStates,
  covs,
  data,
  dataNames,
  dist,
  Par,
  aInd,
  zeroInflation,
  oneInflation,
  stationary,
  knownStates,
  betaRef,
  mixtures
)

Arguments

nbStates

Number of states,

covs

Covariates,

data

A momentuHMMData object of the observations,

dataNames

Character vector containing the names of the data streams,

dist

Named list indicating the probability distributions of the data streams.

Par

Named list containing the state-dependent parameters of the data streams, matrix of regression coefficients for the transition probabilities ('beta'), and initial distribution ('delta').

aInd

Vector of indices of the rows at which the data switches to another animal

zeroInflation

Named list of logicals indicating whether the probability distributions of the data streams are zero-inflated.

oneInflation

Named list of logicals indicating whether the probability distributions of the data streams are one-inflated.

stationary

false if there are time-varying covariates in formula or any covariates in formulaDelta. If true, the initial distribution is considered equal to the stationary distribution. Default: false.

knownStates

Vector of values of the state process which are known prior to fitting the model (if any). Default: NULL (states are not known). This should be a vector with length the number of rows of 'data'; each element should either be an integer (the value of the known states) or NA if the state is not known.

betaRef

Indices of reference elements for t.p.m. multinomial logit link.

mixtures

Number of mixtures for the state transition probabilities

Value

Negative log-likelihood


momentuHMM documentation built on Sept. 5, 2021, 5:17 p.m.