stationary: Stationary state probabilities

View source: R/stationary.R

stationaryR Documentation

Stationary state probabilities

Description

Calculates the stationary probabilities of each state, for given covariate values.

Usage

stationary(m, covs, beta = m$mle$beta)

Arguments

m

Fitted model (as output by fitHMM).

covs

Either a data frame or a design matrix of covariates.

beta

Optional matrix of regression coefficients for the transition probability model. By default, uses estimates in m.

Value

Matrix of stationary state probabilities. Each row corresponds to a row of covs, and each column corresponds to a state.

Examples

# m is a moveHMM object (as returned by fitHMM), automatically loaded with the package
m <- example$m

# data frame of covariates
stationary(m, covs = data.frame(cov1 = 0, cov2 = 0))

# design matrix (each column corresponds to row of m$mle$beta)
stationary(m, covs = matrix(c(1,0,cos(0)),1,3))


moveHMM documentation built on May 31, 2023, 6:13 p.m.