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 on each value in par0
is
not specified K
MUST be; if par0
is specified, K
is ignored.tmp
and Rho
, if tmp
is TRUE then the function
init.all() chooses entries for then starting value of tmp
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
.Liu, Limin, "Hidden Markov Models for Precipitation in a Region of Atlantic Canada", Master's Report, University of New Brunswick, 1997.
sim.hmm()
# See the help for sim.hmm() for how to generate y.sim.
try <- hmm(y.sim,K=2,verb=T)
Run the code above in your browser using DataLab