Testing...
The goal of spasm
is to implement the first order Laplace Gaussian filter (as described in Koyama et al) for estimating state space models whose observation equation has a mean function which is a spline in the unobserved state:
[
\begin{align}
y_t &= Z(x_t) + \epsilon_t\
x_{t+1} &= T x_t + \eta_t,
\end{align}
]
where $Z(x)$ is a sparse spline estimated via the group lasso.
You can install spasm from github with:
# install.packages("devtools")
devtools::install_github("dajmcdon/spasm")
This is a basic example which shows you how to solve a common problem:
someData = generateSPASM(100,3,4)
SPAMfit = spam(someData$y, someData$x)
filt = lgf1(someData$y, SPAMfit, someData$Tt,
solve(someData$HHt), someData$GGt, rep(0,3), diag(1,3))
matplot(someData$x, ty='l', col=1, lty=1)
matlines(filt$xtt, col=2, lty=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.