simulate_observations: Simulate state-dependent observations

View source: R/simulate_data.R

simulate_observationsR Documentation

Simulate state-dependent observations

Description

This function simulates state-dependent observations.

Usage

simulate_observations(
  markov_chain,
  sdd,
  mus,
  sigmas,
  dfs = NULL,
  seed = NULL,
  total_length = length(markov_chain)
)

Arguments

markov_chain

A numeric vector of states of a Markov chain.

sdd

A character, the name of the state-dependent distribution, one of "t", "gamma", and "lnorm".

mus

A numeric vector of expected values.

sigmas

A numeric vector of standard deviations.

dfs

A numeric vector of degrees of freedom. Only relevant if sdd = "t".

seed

Set a seed.

total_length

An integer, the total length of the output vector. Must be greater or equal than length(markov_chain).

Value

A numeric vector of length total_length, where the first length(markov_chain) elements are numeric values and the last total_length - length(markov_chain) elements are NA_real_.


fHMM documentation built on Oct. 12, 2023, 5:10 p.m.