hmm(y, yval=NULL, par0=NULL, K=NULL, rand.start=NULL, mixture=FALSE,
tolerance=1e-4, verbose=FALSE, itmax=200, crit='PCLL', data.name=NULL)
y
is a matrix, each column is interpreted as an independent
replicate of the observation sequence.y
. If any value of y
does not match
some value of yval
, it will be treated as a MISSING VALUE.tpm
(transition probability
matrix) and Rho
. The matrix Rho
specifies the
probability that the observations take par0
is
not specified K
MUST be; if par0
is specified, K
is ignored.Note that K=1
is acceptable; if K
is 1 then all
observa
tpm
and Rho
, if tpm
is TRUE then the function
init.all() chooses entries for then starting value of tpm
at
random; likewise for Rho
itmax
EM steps have been performed, a warning message is printed out,
and the function stops. A value is returned by the function
anyway, with the logical component "converged" set toy
as determined by deparse(substitute(y))
.Rho
specifying the
distributions of the observations.tpm
.tpm
.tpm
, ispd
, converged
, and
nstep
are all set equal to NA
in the list returned
by this function.Liu, Limin, "Hidden Markov Models for Precipitation in a Region of Atlantic Canada", Master's Report, University of New Brunswick, 1997.
sim.hmm()
, mps()
,
viterbi()
# See the help for sim.hmm() for how to generate y.sim.
try <- hmm(y.sim,K=2,verb=TRUE)
Run the code above in your browser using DataLab