# R/momentuHMM.R In momentuHMM: Maximum Likelihood Analysis of Animal Movement Behavior Using Multivariate Hidden Markov Models

#### Documented in is.momentuHMMmomentuHMM

```#' Constructor of \code{momentuHMM} objects
#'
#' @param m A list of attributes of the fitted model: \code{mle} (the maximum likelihood estimates of
#' the parameters of the model), \code{data} (the \code{fitHMM} data), \code{mod} (the object
#' returned by the \code{fitHMM} numerical optimizer \code{nlm} or \code{optim}), \code{conditions} (conditions used to fit
#' the model: \code{dist}, \code{zeroInflation}, \code{estAngleMean}, \code{circularAngleMean}
#' \code{stationary}, \code{formula}, \code{userBounds}, \code{bounds}, \code{workBounds}, \code{DM}, etc.),
#' \code{stateNames}, and \code{rawCovs} (optional -- only if there are transition probability matrix covariates in the data).
#'
#' @return An object \code{momentuHMM}.

momentuHMM <- function(m)
{
if(is.null(m\$data) | is.null(m\$mle) | is.null(m\$mod) | is.null(m\$conditions) | is.null(m\$stateNames))
stop("Can't construct momentuHMM object: fields are missing")

obj <- m

class(obj) <- append("momentuHMM",class(obj))
return(obj)
}

#' Is momentuHMM
#'
#'
#' @param x An R object
#'
#' @return \code{TRUE} if \code{x} is of class \code{\link{momentuHMM}}, \code{FALSE} otherwise.

is.momentuHMM <- function(x)
inherits(x,"momentuHMM")
```

## Try the momentuHMM package in your browser

Any scripts or data that you put into this service are public.

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