Displaying 20 results from an estimated 800 matches similar to: "How to call to R_KalmanLike from outside StructTS"
2011 Apr 14
0
StructTS fitting problem - can anyone help?
I have seen a couple of posts about this, but no solutions. The problem is fitting the Basic Structural Model (BSM) to the AirPassengers time series using StructTS. ?For this particular time series, if the length is reduced below 140 months, the BSM fits are bad.?
The following illustrates the problem
ap0 <- log10(AirPassengers) - 2ap<-ts(ap0[1:139], freq=12) ?# bad fits for length <
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],
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
2009 Oct 14
1
"Error: testing 'stats' failed" - R 2.9.2 on Linux
I've just built R 2.9.2 from source on Slackware Linux 13.0 - 32-bit
(will try 64-bit also next) - and seen:
> Collecting examples for package 'stats'
> Running examples in package 'stats'
> Error: testing 'stats' failed
> Execution halted
> make[3]: *** [test-Examples-Base] Error 1
Looking at R-2.9.2/tests/Examples/stats-Ex.Rout.fail I see:
...
>
2010 Nov 30
1
StructTS with 2 seasons
Dear All,
I am trying to fit a structural time series model using the StructTS
function (package stats) with only 2 seasons (summer and winter). More
than 2 seasons work fine but with 2 seasons I get this error:
> fit <- StructTS(y.ts, type="BSM")
Error in T[cbind(ind + 1L, ind)] <- 1 : subscript out of bounds
I have looked at Prof. Ripley's 2002 RNews article but cannot
2004 Nov 09
1
StructTS (PR#7353)
Dear R-bugs
I have been studying the StructTS function (in package 'stats') and
functions supplied with it. I think I have found a few minor bugs in the
documentation.
I am referring to the version of StructTS supplied with the release R 2.0.0.
Output from 'version'
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
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 <-
2011 Mar 08
3
This is supposed to predict a time series?!
Hello,
I just ran the predict.StructTS function using the AirPassengers data
and got a ridiculous result. Here's what I ended up with:
http://24.210.155.111/PredictWhat!.pdf
Who wrote this? Am I seriously supposed to think this function would
accurately predict a time series?
-AnalogKid
2005 Jan 11
0
StructTS
Dear R-list,
I try to use StructTS for some univariate time series, with a type="BSM". I
have two questions:
1-in the "fitted" value of the object, it seems to me that for getting back
fitted values, one have to add level, slope and seasonal (or "level"
contains already the two other ones)
2-i am really circumspect about the results of "KalmanForecast"
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
2002 Sep 11
1
StructTS questions
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
2015 Mar 16
0
Initial covariance matrix in StructTS
Dear all,
The definition of the initial covariance matrix P in StructTS function seems to be defined in a somewhat non-standard way without any references. Usually that matrix is defined as a diagonal matrix in case of structural time series models, but StructTS defines this as a singular matrix filled with 1e+06 * var(x, na.rm = TRUE)/100 where x is the time series being modelled.
I wonder if
2004 Aug 10
0
Check failed after compilation (PR#7159)
Full_Name: Madeleine Yeh
Version: 1.9.1
OS: AIX 5.2
Submission from: (NULL) (151.121.225.1)
After compiling R-1.9.1 on AIX 5.2 using the IBM cc compiler, I ran the
checks. One of them failed. Here is the output from running the check solo.
root@svweb:/fsapps/test/build/R/1.9.1/R-1.9.1/tests/Examples:
># ../../bin/R --vanilla < stats-Ex.R
R : Copyright 2004, The R
2007 Jun 02
1
Problem with the command "StrucTS" that fits a basic structural model for time series
Hi everybody,
I'am very interested with the basic structural model of time series. So I used the command "StructTS" but I failed to obtain a desirable output, in fact when I write in R Console the following lines:
> x=(1,2,3,4,5,2,25,14,12,13,11,6,9,24,12,13,14,12,12,14,11,12,14,15,20,21,22,23,21,25,28)
>(fit <- StructTS(x,type = "BSM"))
I obtained the following
2012 Mar 28
1
One last thing
Dear R,
Thanks for helping me locate the source for the StructTS method from stats, but I've run in to a roadblock in reverse engineering it to locate a formula for its forecasting because it calls some compiled C code, a function called KalmanLike. I've looked through that R library that the StructTS method code was located in and could not find it.
Sincerely,
2005 Nov 30
0
unexpected result from KalmanRun (KalmanLike, StructTS)
(re-formulate, re-send, without html)
for vector y = c(1,2,3,4,5), H = 0.66 manual
calculations
using the equations below give a =
c(1,1.66,2.55,3.51,4.50).
KalmanRun with these parameters gives res$states =
(1,1,1,1,1)!
for Kalman Filter Durbin/Koopman give at p67 eqs
4.13:
v = y - Z a, F = Z P Z' + H, K = T P Z' / F +
H,
a[t+1] = T a + K v, P[t+1] = T P L'
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,
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
2006 Nov 01
1
did my searching but still couldn't find anything for bayesian dlm
I familarized myelf with kalmanlike and structts which are approaches
for building and estimating ( and forecasting ) state space models ( or
the equivalent arima models ).
back in 2003, gavin simpson wrote an email describing the west and
harrison apprach to estimate state space models and asked if anything
was out there for
using that approach. the goals of this approach are the same as kalman
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