Thank you. The new article linked below is excellent. BTW, I have had trouble getting the sample code to run. In particular, there is a variable k that does not appear to be set when it is used at line 227.
Here is the line where it is called: fit <- optim(par = rep(0, 2 * k), fn = logLik, method = "BFGS", control = list(maxit = 500)) Here is the error message: $ R --vanilla < kfas.R > kfas.Rlog Error in rep.int(1, length(par)) : object 'k' not found Calls: optim -> rep.int Execution halted Any advice? Thanks. Best, Michael On Fri, Jun 10, 2011 at 8:22 AM, Gavin Simpson <gavin.simp...@ucl.ac.uk> wrote: > > On Tue, 2011-06-07 at 17:24 +0100, Michael Ash wrote: > > This question pertains to setting up a model in the package "dlm" > > (dynamic linear models, > > http://cran.r-project.org/web/packages/dlm/index.html > > The author of the dlm package has just published a paper on state space > models in R including details on setting up dlm: > > http://www.jstatsoft.org/v41/i04 > > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.