update.hmm.discnp {hmm.discnp} | R Documentation |
Update a fitted hmm.discnp
model.
Description
An update()
method for objects of class hmm.discnp
.
Usage
## S3 method for class 'hmm.discnp'
update(object,..., data, Kplus1=FALSE,
tpm2=NULL, verbose=FALSE, method=NULL, optimiser=NULL,
stationary=NULL, mixture=NULL, cis=NULL, tolerance=NULL,
itmax=NULL, crit=NULL, X=NULL, addIntercept=NULL)
Arguments
object |
An object of class |
... |
Not used. |
data |
The data set to which the (updated) model is to be fitted. See the
description of the |
Kplus1 |
Logical scalar. Should the number of states be incremented by 1?
If so then Note that the intial likelihood of the “new” model with
The Experience indicates that when |
tpm2 |
The transtion probability matrix to use when updating a model
fitted with |
verbose |
See the help for |
method |
See the help for |
optimiser |
See the help for |
stationary |
See the help for |
mixture |
See the help for |
cis |
See the help for |
tolerance |
See the help for |
itmax |
See the help for |
crit |
See the help for |
X |
See the help for |
addIntercept |
See the help for |
Details
Except for argument X
, any arguments that are left NULL
have their values supplied from the args
component of object
.
Value
An object of class hmm.discnp
with an additional component
init.log.like
which is the initial log likelihood
calculated at the starting values of the parameters (which may
be modified from the parameters returned in the object being
updated, if Kplus1
is TRUE
). The calculation is
done by the function logLikHmm()
. Barring the strange and
unforeseen, init.log.like
should be (reassuringly) equal
to object$log.like
. See hmm()
for details of
the other components of the returned value.
Author(s)
Rolf Turner
r.turner@auckland.ac.nz
See Also
hmm()
rhmm.hmm.discnp()
Examples
set.seed(294)
fit <- hmm(WoodPeweeSong,K=2,rand.start=list(tpm=TRUE,Rho=TRUE),itmax=10)
xxx <- rhmm(fit,nsim=1)
sfit <- update(fit,data=xxx,itmax=10)
yyy <- with(SydColDisc,split(y,f=list(locn,depth)))
f1 <- hmm(yyy,K=1)
f2 <- update(f1,data=yyy,Kplus1=TRUE) # Big improvement, but ...
## Not run:
g2 <- hmm(yyy,K=2) # Substantially better than f2.
## End(Not run)