Learn R Programming

fHMM (version 1.4.2)

simulate_observations: Simulate state-dependent observations

Description

This function simulates state-dependent observations.

Usage

simulate_observations(
  markov_chain,
  sdd,
  mu,
  sigma = NULL,
  df = NULL,
  seed = NULL,
  total_length = 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_.

Arguments

markov_chain

A numeric vector of states of a Markov chain.

sdd

A character, the name of the state-dependent distribution.

mu

A numeric vector of expected values.

sigma

A numeric vector of standard deviations (if any).

df

A numeric vector of degrees of freedom (if any).

seed

Sets a seed for the observation sampling.

total_length

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