Thanks David, that's the clue I needed. Since x monotonically increases, all I needed to do was:
ssModel = SSModel( t ~ SSMtrend(degree=1, Q=matrix(NA)), H=matrix(NA), distribution="gaussian") On Sun, Jul 30, 2017 at 10:11 AM, David Winsemius <dwinsem...@comcast.net> wrote: > > > On Jul 30, 2017, at 5:10 AM, Spencer Graves <spencer.graves@ > effectivedefense.org> wrote: > > > > > > > > On 2017-07-29 11:26 PM, Staff wrote: > >> I found an example at > >> http://www.bearcave.com/finance/random_r_hacks/kalman_smooth.html > > > > That example is signed by "Ian Kaplan". There's a box at the > bottom of the page for you to email him. > > > >> shown > >> below. But it seems the structSSM function has been removed from KFAS > >> library > > > > or it never was part of KFAS. I don't know. > > It was part of KFAS. Searching with Google finds both the code as well as > postings to Rhelp and Freelancer.com with requests (some for pay) to write > replacements. > > > > >> so it won't run. Does anyone know how to fix the code so that it > >> runs? > > > > Have you tried the vignette with KFAS? > > Indeed. The section on structural time series implies that the > functionality of the structSSM function has been replaced with three > functions: SSMtrend, SSMcycle, and SSMseasonal. > > If you (meaning Staff, not Spencer) are not up to the task of making the > transition to the new version of KFAS, then perhaps you should hire a > consultant who can provide both code and sufficient documentation that you > will be able to understand what is "under the hood". > > Best; > David. > > > > > > Hope this helps. > > Spencer Graves > >> > >> library(KFAS) > >> library(tseries) > snipped > >> > >> [[alternative HTML version deleted]] > >> > >> ______________________________________________ > > David Winsemius > Alameda, CA, USA > > 'Any technology distinguishable from magic is insufficiently advanced.' > -Gehm's Corollary to Clarke's Third Law > > > > > > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.