Displaying 20 results from an estimated 900 matches similar to: "Kalman Filter Forecast using 'SSPIR'"
2006 Apr 29
1
SSPIR problem
I am having a problem with the package SSPIR. The code below
illustrates it. I keep getting the message: "Error in y - f :
non-conformable arrays."
I tried to tweak the code below in many different ways, for example,
substituting rbind for cbind, and sometimes I get a different error
message, but I could not find a variation of this code that would
work.
Any help will be greatly
2008 May 07
1
dlm with constant terms
Hi,
I am trying to figure how to use dlm with constant terms
(possibly time-dependent) added to both equations
y_t = c_t + F_t\theta_t + v_t
\theta_t = d_t + G_t\theta_{t-1} + w_t,
in the way that S-PLUS Finmetrics does?
Is there any straightforward way to transform the above to
the default setup?
Thanks,
Tsvetan
--------------------------------------------------------
NOTICE: If received in
2006 Dec 20
2
Kalman Filter in Control situation.
I am looking for a Kalman filter that can handle a control input. I thought
that l.SS was suitable however, I can't get it to work, and wonder if I am
not using the right function. What I want is a Kalman filter that accepts
exogenous inputs where the input is found using the algebraic Ricatti
equation solution to a penalty function. If K is the gain matrix then the
exogenous input
2010 Oct 06
1
dlm package: how to specify state space model?
Dear r-users!
I have another question regarding the dlm package and I would be very
happy if someone could give me a hint!
I am using the dlm package to get estimates for an endogenous rate of
capacity utilization over time. The general form of a state space model
is
(1) b_t = G * b_t-1 + w_t w_t ~ N(0,W)
(2) y_t= A' * x_t + H' * b_t + v_t v_t ~ N(0,V)
(Hamilton 1984: 372)
The
2009 Feb 15
0
Kalman Filter - dlm package
Dear all,
I am currently trying to use the "dlm" package for Kalman filtering.
My model is very simple:
Y_t = F'_t Theta_t + v_t
Theta_t = G_t Theta_t-1 + w_t
v_t ~ N(0,V_t) = N(0,V)
w_t ~ N(0,W_t) = N(0,W)
Y_ t is a univariate time series (1x1)
F_t is a vector of factor returns (Kx1)
Theta_t is the state vector (Kx1)
G_t is the identity matrix
My first
2005 Dec 01
1
Kalman Smoothing - time-variant parameters (sspir)
Dear R-brains,
I'm rather new to state-space models and would benefit from the extra
confidence in using the excellent package sspir.
In a one-factor model, If I am trying to do a simple regression where
I assume the intercept is constant and the 'Beta' is changing, how do
I do that? How do i Initialize the filter (i.e. what is appropriate to
set m0, and C0 for the example below)?
2010 Nov 14
5
kalman filter
Hello,
I would like use Kalman filter for estimating parameters of a stochastic
model. I have developed the state space model but I don’t know the correct
way use Kalman filter for parameter estimation. Has anybody experience in
work with Kalman filter in R.
I don’t know the correct function. Maybe it is
- KalmanLike; but what is the correct Input?
- tsmooth?
-
2007 Nov 15
3
kalman filter estimation
Hi,
Following convention below:
y(t) = Ax(t)+Bu(t)+eps(t) # observation eq
x(t) = Cx(t-1)+Du(t)+eta(t) # state eq
I modified the following routine (which I copied from: http://www.stat.pitt.edu/stoffer/tsa2/Rcode/Kall.R) to accommodate u(t), an exogenous input to the system.
for (i in 2:N){
xp[[i]]=C%*%xf[[i-1]]
Pp[[i]]=C%*%Pf[[i-1]]%*%t(C)+Q
siginv=A[[i]]%*%Pp[[i]]%*%t(A[[i]])+R
2008 Feb 26
2
Kalman Filter
Hi
My name is Vladimir Samaj. I am a student of Univerzity of Zilina. I am
trying to implement Kalman Filter into my school work. I have some problems
with understanding of R version of Kalman Filter in package stats( functions
KalmanLike, KalmanRun, KalmanSmooth,KalmanForecast).
1) Can you tell me how are you seting the initial values of state vector in
Kalman Filter? Are you using some method?
2006 Jan 03
2
KALMAN FILTER HELP
Hi All,
Currently I'm using DSE package for Kalman Filtering. I have a dataset
of one dependent variable and seven other independent variables. I'm
confused at one point. How to declare the input-output series using
TSdata command. Because the given example at page 37 showing some error.
rain <- matrix(rnorm(86*17), 86,17)
radar <- matrix(rnorm(86*5), 86,5)
mydata <-
2007 Nov 24
0
Help on State-space modeling
Hi all,
I'm working on a term structure estimation using state-space modeling for
1, 2 and 3 factor models.
When I started to read the functions on R, I got to the function ss on the
library sspir. From what I
understood this function is similar to SsfFit from S-PLUS. But for my models
purpose there is something
left to be desired. Its formulation follow these equations:
*Y_t = F_t^T *
2013 Jan 03
2
simulation
Dear R users,
suppose we have a random walk such as:
v_t+1 = v_t + e_t+1
where e_t is a normal IID noise pocess with mean = m and standard deviation = sd and v_t is the fundamental value of a stock.
Now suppose I want a trading strategy to be:
x_t+1 = c(v_t – p_t)
where c is a costant.
I know, from the paper where this equations come from (Farmer and Joshi, The price dynamics of common
2007 Dec 05
2
kalman filter random walk
Hi,
I'm trying to use the kalman filter to estimate the variable drift of a
random walk, given that I have a vector of time series data. Anyone have
any thoughts on how to do this in R?
Thanks,
Alex
[[alternative HTML version deleted]]
2010 May 25
2
Kalman Filter
Hello
My name is greigiano am student of Applied Economics, Department of Rural
Economy.
I am working on an article forecasting, which use the dynamic linear model,
a model state space. I am wondering all the commands in R, to represent the
linear dynamic model and Kalman filter.
I am available for any questions.
--
DEUS Seja Louvado
Que ELE Ilumine sua vida
Assim como ELE tem Iluminado a Minha
2009 Sep 11
3
State Space models in R
Hello everybody,
I am writing a review paper about State Space models in R, and I would
like to cover as many packages as I reasonably can.
So far I am familiar with the following tools to deal with SS models:
* StructTS, Kalman* (in stats)
* packages dse[1-2]
* package sspir
* package dlm
I would like to have some input from users who work with SS models:
are there any other packages for SS
2007 Feb 21
1
loops in R help me please
I am trying to make the following Kalman filter equations work and therefore produce their graphs.
v_t=y_t - a_t
a_t+1=a_t+K_t*v_t
F_t=P_t+sigma.squared.epsilon
P_t+1=P_t*(1-K_t)+sigma.squared.eta
K_t=P_t/F_t
Given:
a_1=0,P_1=10^7,sigma.squared.epsilon=15099,
sigma.squared.eta=1469.1
I have attached my code,which of course doesnt work.It produces NAs for the Fs,Ks and the a.
Can somebody tell me
2007 Aug 14
2
State Space Modelling
Hey all,
I am trying to work under a State Space form, but I didn't get the help
exactly.
Have anyone eles used this functions?
I was used to work with S-PLUS, but I have some codes I need to adpt.
Thanks alot,
Bernardo
[[alternative HTML version deleted]]
2010 Sep 28
0
Time invariant coefficients in a time varying coefficients model using dlm package
Dear R-users,
I am trying to estimate a state space model of the form
(1) b_t = G * b_t-1 + w_t w_t ~ N(0,W)
(2) y_t= A' * x_t + H' * b_t + v_t v_t ~ N(0,V)
(Hamilton 1984: 372)
In particular my estimation in state space form looks like
(3) a3_t = 1 * a3_t-1 + w_t w_t ~ N(0,W)
(4) g_t = (a1, a2) * (1, P_t)' + u_t * a3_t + v_t v_t ~ N(0,V)
where g_t is the
2012 Mar 08
2
KalmanSmooth
I have a bunch of clean timeseries data obtained from a sensor and I'd
like to apply a Kalman Filter to it to smoothe it out. Through a few
days of Googling, reading papers, implementing such a filter in
various languages, I finally realised that it may be built into R. So
I did a "??kalman" at the R prompt and found that it is indeed there.
However, the help page is a tad bare,
2006 Jun 15
1
SSPIR problem
Dear R-Users,
I'm using SSPIR package for a spatio-temporal application.
Is it possible to modify the structure of the involved matrixes (Fmat,
Gmat, Vmat,Wmat)?
I want to create a model like this
#y(t)=k*theta(t)+epsilon(t)
#theta(t)=h*theta(t-1)+eta(t)
#epsilon(t) N(0,V) V=sigma2*I
#eta(t) N(0,W) W=sigma2_eta
where the state variable theta has dimension 1(p=1) and at