istates: Initial state probabilities.

Description Usage Arguments Value See Also Examples

View source: R/getters.R

Description

Returns the initial state probabilities from a HMM object. The object has to be initialized with initparams, which generates a random initial state. The vector of probabilities follows the same order as the states, so ptransition(model)[i] is the probability of state i. Of course, the probabilities sum up to one.

Usage

1
2
3
4
istates(x)

## S3 method for class 'HMM'
istates(x)

Arguments

x

the HMM object.

Value

A numeric vector with the probabilities.

See Also

initparams, fit, nstates, initsteady

Examples

1
2
3
4
5
6
model <- HMM(2)
model <- addtransition(model,c(1,2))
model <- addtransition(model,c(2,1))
model <- initparams(model)
istates(model)
sum(istates(model)) # should be one

MobilePhoneESSnetBigData/destim documentation built on Dec. 7, 2020, 7:35 p.m.