Comments (3)
By default, the fitSSM
function estimates only unknown parameters in Q and H (in Gaussian case), and in general you need to provide your own function which updates the model given the parameters. So something like this:
updatefn <- function(parameters, model) {
model$Q[1,1,1] <- exp(parameters[1])
model$Q[2,2,1] <- exp(parameters[2])
model$Q[3,3,1] <- exp(parameters[3])
model$u[] <- exp(parameters[4])
model
}
fit <- fitSSM(model, updatefn=update, inits=c(0,0,0,0))
from kfas.
Thank you so much! I think the difference between a "state" (e.g., level, slope, 11 seasonal dummy variables) and a "parameter" was confusing me. Thanks again!
from kfas.
Yeah, the states are estimated automatically by Kalman filter and smoother, whereas you need to use numerical optimization for the parameters.
from kfas.
Related Issues (20)
- Handle intercepts in the model HOT 6
- Model non-gaussian multivariate outcome HOT 5
- Positive log likelihood for Poisson and Binomial distribution HOT 5
- How to predict more time series HOT 1
- Wrong convergence without warnings or errors HOT 15
- Requesting State Offset Term or Control Input specification HOT 2
- KFS function HOT 4
- Change .f95 suffix to .f90 HOT 1
- Exact diffuse intialisation HOT 3
- Exogenous variable
- Documentation: "more complex model" example HOT 2
- Returning Importance Samples in predict.SSModel HOT 3
- How to extract time varying coefficients and CIs corresponding to each variable in SSMregression HOT 2
- How to extract the overdispersion parameters in regression models assuming negative binomial distribution HOT 7
- Poor time variability of time-varying regression coefficients and Inconsistency of param estimates among methods in fitSSM HOT 9
- Standardized residuals HOT 6
- Difficulty with setting a1 and P1 when using SSMseasonal and reduced number of harmonics HOT 1
- Question building an Ar(2) model HOT 6
- same Log Likelihood of different SSModel HOT 6
- Kalman filter HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kfas.