timeInStates: Calculate proportion of time steps assigned to each state (i.e. “activity budgets”)
Description
Calculate proportion of time steps assigned to each state (i.e. “activity budgets”)
Usage
timeInStates(m, by = NULL, alpha = 0.95, ncores = 1)
# S3 method for momentuHMM
timeInStates(m, by = NULL, alpha = 0.95, ncores = 1)
# S3 method for HMMfits
timeInStates(m, by = NULL, alpha = 0.95, ncores = 1)
# S3 method for miHMM
timeInStates(m, by = NULL, alpha = 0.95, ncores = 1)
Value
If m is a momentuHMM object, a data frame containing the estimated activity budgets for each state (grouped according to by). If m is a miHMM or HMMfits object, a list containing the activity budget
estimates, standard errors, lower bounds, and upper bounds across all imputations.
Arguments
m
A momentuHMM, miHMM, or HMMfits object.
by
A character vector indicating any groupings by which to calculate the proportions, such as individual (“ID”) or group-level (e.g. sex or age class) covariates. Default is NULL (no groupings are used).
alpha
Significance level for calculating confidence intervals of pooled estimates. Default: 0.95. Ignored unless m is a miHMM or HMMfits object.
ncores
Number of cores to use for parallel processing. Default: 1 (no parallel processing). Ignored unless m is a miHMM or HMMfits object.