similar to: unexpected result from KalmanRun (KalmanLike, StructTS)

Displaying 20 results from an estimated 300 matches similar to: "unexpected result from KalmanRun (KalmanLike, StructTS)"

2004 Oct 12
1
KalmanLike: missing exogenous factor?
>From the help document on KalmanLike, KalmanRun, etc., I see the linear Gaussian state space model is a <- T a + R e y = Z' a + eta following the book of Durbin and Koopman. In practice, it is useful to run Kalman filtering/smoothing/forecasting with exogenous factor: a <- T a + L b + R e y = Z' a + M b + eta where b is some known vector (a function of time). Some other
2005 Jun 15
1
Kalman Filtering?
1. The function "KalmanLike" seems to change its inputs AND PREVIOUSLY MADE copies of the inputs. Consider the following (using R 2.1.0 patched under Windows XP): > Fig2.1 <- StructTS(x=Nile, type="level") > unlist(Fig2.1$model0[2:3]) a P 1120 286379470 > tst2 <- tst <- Fig2.1$model0 > tst23 <- tst[2:3] > tst23u <-
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?
2004 Sep 19
0
StructTS; measurement variance zero
Hello everybody, I'm investigating several time series with StructTS, and for one series I get zero variance for the measurement errors (local level model). I've read in Brian Dipleys article on time series in the R-Newsletter June/2002, that the airline passengers data set yields the same result. Having the variance of epsilon as zero, I would expect the residuals (y - Z a) to be
2007 Apr 11
1
Programming Problem (for loop, random # control, 3 dimentional graph)
Dear List, This is just a programming problem which i cannot seem to figure out. I am trying to get a set of power from a test (say, kolmogorov smirnov) out of a distribution (say, G-K distribution) as follows. I am trying to reduce to pain of writing the whole set of data points (p# below) using "for" loop. However, I seem to have some problem in it as the output "M" does not
2012 Apr 30
2
The constant part of the log-likelihood in StructTS
Dear all, I'd like to discuss about a possible bug in function StructTS of stats package. It seems that the function returns wrong value of the 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
2010 Sep 10
0
How to call to R_KalmanLike from outside StructTS
Dear all: I want to modify the 'StructTS' function from the 'stats' package. First, I am writing a working copy of the original version and got some problems. I have two versions of the function plus the original one. The first version is the same code as the 'StructTS' function: StructTS.v1 <- function (x, type = c("level", "trend",
2006 Jan 02
1
Use Of makeARIMA
Hi R-Experts, Currently I'm using an univariate time series in which I'm going to apply KalmanLike(),KalmanForecast (),KalmanSmooth(), KalmanRun(). For I use it before makeARIMA () but I don't understand and i don't know to include the seasonal coefficients. Can anyone help me citing a suitable example? Thanks in advance. ------------------------------------------
2003 May 14
2
how to include 'NA's in xtabs?
Hello! I have a dataset with NA's in some variables (factors), for example: $ P67 : Factor w/ 2 levels "-","+": NA 2 1 NA NA 2 1 1 2 NA ... I need to use 'xtabs' like xtabs(~x$P67) It works well and produces something like this: x$P67 - + 779 1318 but i want to compute NA's too, like this: x$P67 - + NA 779 1318 137 I am trying
2012 Mar 23
2
Fwd: The StructTS method
To whomever it may concern, I'm a young Industrial Engineer working on Senior Design at Georgia Tech and have found the StructTS method to be excellent for the training set for my forecasting project. There's only one problem: I don't actually understand what a Structural Time Series IS. I've looked up resources on it, and get that essentially you're dividing the Time
2003 Aug 27
1
Problem in StructTS() when the first element of the serie is NA ( (PR#3990)
Hi all, I've experienced this problem using StructTS(x) when the *first* element of x is a NA (R:R1.7.0, os: w2ksp4). Please look at the following code: a=rep(1:7,10) library(ts) #this works StructTS(a) #this works x=a x[2]=NA StructTS(x) #this doesn't work x=a x[1]=NA StructTS(x) The last command returns this error "Error in optim(init[mask], getLike,
2008 Mar 16
2
(no subject)
Hi, I am trying to use the Fisher scoring method with a geometric distribution, with p = .07, 100 observations from the geom distrib, and 10 iterations. I cannot quite get the code to work. Can anyone see the mistake? n <- 100 p <- 0.07 x <- rgeom(n, p) s <- sum(x) f <- function(x, p) p*(1-p)^x L <- function(p) p^n*(1-p)^s logL <- function(p)
2007 Apr 05
2
StructTS
I apologize in advance if I picked the wrong list to post this to. I have made an effort to find the answers to these questions on CRAN, but if they are there, I couldn't find them, and I was going to email the developer of StructTS directly but could not find who that is. I have 2 interrelated questions about StructTS 1. Where can I obtain the source code for StructTS if I wanted to
2003 Jan 28
2
Error from StructTS
Hi, I used function StructTS some time ago to fit a structural model to a time series. Now with R 1.6.2-1 I repeated the analysis with the same series and I get the following error: Error in KalmanLike2(y, Z, -1) : invalid argument type I tried with other series and I get the same error; I checked the examples in the documentation and they work fine. I suspect I am missing something
2011 Feb 22
0
Problem with forward prediction using StructTS output
I am having problems with forward prediction using the output of the Basic Structural Model from StructTS. The following snippet illustrates the problem: t_end <- 139 nahead <- 20 data(AirPassengers) ap <- log10(AirPassengers)-2 fit <- StructTS(ts(ap[1:t_end], freq=12), type="BSM") p <- stats:::predict.StructTS(fit, n.ahead=nahead) plot(1:t_end, ap[1:t_end],
2009 Dec 17
1
StructTS standard errors
Hello, Does anybody know if (and how) it is possible to obtain standard errors of estimated variances from StructTS? (R 2.10.0). Thank you in advance, Giovanni
2012 May 15
1
StructTS Examples
In the examples for StructTS -- ($RHOME)/library/stats/man/StructTS.Rd -- could par(mfrow = c(4, 1)) plot(log10(UKgas)) plot(cbind(fitted(fit), resids=resid(fit)), main = "UK gas consumption") become plot(log10(UKgas)) par(mfrow = c(4, 1)) plot(cbind(fitted(fit), resids=resid(fit)), main = "UK gas consumption") ## Note that par was moved down This makes the plot of UKgas
2002 Oct 29
2
StructTS
Dear all, I am applying the StructTS function in ts-package. For some time series the program terminates and the following error appears: Error in optim(init[mask], getLike, method = "L-BFGS-B", lower = rep(0, : L-BFGS-B needs finite values of fn Do someone know what do I have to adjust in the original time series to avoid this error? It works fine for some subsets of the
2002 Sep 14
1
ts/structTS question
Dear All I would like to use the StructTS function in the ts library to fit the ' BSM ' model. I have some, probably basics, questions about the model and about the function(s): 1) How can I check the statistical significance of the estimated parameters(variances)? 2) Is there some way to find what component "dominate" the series? 3) Is there a function to produce
2005 Jun 01
0
StructTS and arima and missing values
Dear List, I am thinking about ways in which I might analyse some stratigraphic data. The nature of the data series I have generates a number of issues: 1) The data I have in mind come from a sediment core sequence taken from the bottom of a lake. The sequence is sliced into a priori defined slices, in this case 0.2cm per slice. in this way a sequence of 0.2cm slices is produced for the