search for: fkf

Displaying 15 results from an estimated 15 matches for "fkf".

Did you mean: ff
2011 Dec 17
0
time-varying parameters kalman filter estimation problem using FKF package
Dear R users, I am trying to carry out MLE of the time-varying CAPM using the FKF package. My approach so far has been to try and adapt the example given in the help file found using ?fkf which demonstrates the MLE of an ARMA(2,1) model. When I attempt to run my R code (given below) I get the following error: Error in fkf(a0 = sp$a0, P0 = sp$P0, dt = sp$dt, ct = sp$ct, Tt = sp...
2011 Nov 18
1
Ensuring a matrix to be positive definite, case involving three matrices
...hat should I garantee about P and GGt in order to have F = Z %*% P %*% t(Z) + GGt always as a positive definite matrix. Being more precise: I am trying to find minimum likelihood parameters by using the function 'optim' to find the lowest value generated by $LogLik from the function 'fkf' (http://127.0.0.1:27262/library/FKF/html/fkf.html). The variable Kt within the algorithm used to generate the Kalman Filter equations needs in each iteration the inverse of the variable Ft, ("Kt[,, i] = Pt[,, i] %*% t(Zt[,, i]) %*% solve(Ft[,, i])") which is updated by "Ft[,, i...
2010 Nov 18
0
Any help understand the FKF package? Thanks.
  Dear Fellow R Users, I am experimenting right now the FKF package. I started by working out the first example included in the package and I am already confused. Would you offer some kind suggestions? What I want to do is to write down the state transition equation and the measurement equation explicitly. Following the first example: According to: dt &lt...
2011 Sep 22
1
Error in as.vector(data) optim() / fkf()
...no method for coercing this S4 class to a vector I can't figure out what the problem is exactly. I imagine that it has something to do with "tyield" being a matrix. Any help on explaining what's going on and how to solve this is much appreciated. Thank you, Kristian library(FKF) #loading Fast Kalman Filter package library(Matrix) # matrix exponential package K_1 = 0.1156 K_2 = 0.17 sigma_1 = 0.1896 sigma_2 = 0.2156 lambda_1 = 0 lambda_2 = -0.5316 theta_1 = 0.1513 theta_2 = 0.2055 #test data tyield <- matrix(data = rnorm(200), nrow =2, ncol =100) # defining dimension...
2011 Nov 12
1
State space model
...ibution of the innovations of the transition equation depend on the previous value of the state variable. To be exact: y_t|y_{t-1} ~N(mu, Q_t) where Q is a diagonal matrix with elements equal to Q_{i,t} = sigma_i*(1-exp(-kappa_i*h)/kappa_i*(theta_i/2*(1-exp(kappa_i*h)+exp(-kappa_i*h)y_{t-1,i} The fkf returns the filtered states variables so y_{t-1,i} is available. I just can't figure out how to write my program in such a way that this information is included and updated in the state space model for each iteration in optim. Any suggestions on how to solve this are much appreciated. Thank y...
2018 May 02
0
Merging dataframes
...ct.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Dr. Robin Haunschild Max Planck Institute for Solid State Research Heisenbergstr. 1 D-70569 Stuttgart (Germany) phone: +49 (0) 711-689-1285 fax: +49 (0) 711-689-1292 email: R.Haunschild at fkf.mpg.de http://www.fkf.mpg.de/ivs
2018 May 02
2
Merging dataframes
Thanks - Peter, Eivind, Rui Sorry, I perhaps could not explain it properly in the first go. Trying to simplify it here with an example - Say I have two dataframes as below that are NOT equally-sized data frames (i.e., number of columns are different in each table): Table_A: Email Name Phone abc at gmail.com John Chan 0909 bcd at yahoo.com Tim Ma
2009 Nov 29
2
Time Series Rating Model
...weighted function to the completed bivariate poisson model. I know that some other references for dynamic soccer team rating apply below two methods, while I am not familiar with these method:- 1. Brownian Motions ifs (CRAN package) sde (CRAN package) dvfBm (CRAN package) 2. Kalman Filters FKF (CRAN package) KFAS (CRAN package) Hereby I attach some references. I upload the model in R programming file "model.RData" in my skydrive as well. I will appreciate if prof would sharing your precious advice or suggestion. Thank you. Best Regards, Ryusuke A Soccer Scores Modelling E...
2012 Apr 30
2
The constant part of the log-likelihood in StructTS
...log-likelihood, as the added constant to the relevant part of the log-likelihood is misspecified. Here is an simple example: > data(Nile) > fit <- StructTS(Nile, type = "level") > fit$loglik [1] -367.5194 When computing the log-likelihood with other packages such as KFAS and FKF, the loglikelihood value is around -645. For the local level model, the likelihood is defined by -0.5*n*log(2*pi) - 0.5*sum(log(F_t) + v_t^2/sqrt(F_t)) (see for example Durbin and Koopman (2001, page 30). But in StructTS, the likelihood is computed like this: loglik <- -length(y) * res$value...
2011 Nov 05
1
Error in eigen(a$hessian) : infinite or missing values in 'x'
Dear R-users, I'm estimating a two- dimensional state-space model using the FKF package. The resulting log likelihood function is maximized using auglag from the Alabama package. The procedure works well for a subset of my data, but if I try to use the entire data set I get the following error message. Error in eigen(a$hessian) : infinite or missing values in 'x' Wha...
2020 Oct 21
2
AES spesification
Dear I use dataset , as called "mpg" This is code ggplot(data=mpg)+ geom_point(mapping = aes(x=displ, y=hwy, colour=year)) But I would like to see only "year of 1999" in this relationship between x and y variables How could I change the code in this direction? I found the following code library(dplyr)year_1999 <- filter(mpg, year=="1999")ggplot(year_1999,
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,
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? -
2009 Sep 27
3
CRAN (and crantastic) updates this week
CRAN (and crantastic) updates this week New packages ------------ * bdoc (1.0) Michael Anderson http://crantastic.org/packages/bdoc This package contains a function that will classify DNA barcodes as well as a few test and reference data sets. * bdsmatrix (1.0) Terry Therneau http://crantastic.org/packages/bdsmatrix This is a special case of sparse matrices, used by coxme and
2010 Nov 24
0
4. Rexcel (Luis Felipe Parra)-how to run a code from excel
...his problem is: > > > > x[t]=(lambda[t], R[t])? > > A[t]=(1-kappa+delta_t, 0; 0, 1+mu) > > B[t]=(1,0;0,1) > > epsilon[t]=(epsilon_l, epsilon_r)? > > C[t]=(1,1) > > Eta[t]=0 > > > > I used serveral alternative methods (dlm, kalmanLike, fkf, kfilter) for > parameter estimation but I don?t understand the syntax and the correct > input > for model estimation. > > > > Can anybody help me, which packed is the most best for my problem and how > is > it to control? > > > > Thanks for helping. &gt...