Displaying 19 results from an estimated 19 matches similar to: "Strange behaviour of `dlm` package"
2009 Mar 11
1
Forecasting with dlm
Hi All,
I have a problem trying to forecast using the dlm package, can anyone offer
any advise?
I setup my problem as follows, (following the manual as much as possible)
data for example to run code
CostUSD <- c(27.24031,32.97051, 38.72474, 22.78394, 28.58938, 49.85973,
42.93949, 35.92468)
library(dlm)
buildFun <- function(x) {
dlmModPoly(1, dV = exp(x[1]), dW = exp(x[2]))
}
fit <-
2012 Jan 23
0
problems with dlmBSample of the dlm package
Dear R users,
I am trying to use the dlm package, and in particular the dlmBSample function.
For some reason that I am not able to understand, this function does not work properly and the plot of the result does not make sense, while dlmFilter works perfectly.
I think that my_mod is correct, because the output of my_dlmFilter$mod is fine. Where is my mistake or my misunderstanding?
This is the
2005 Jun 14
1
using forecast() in dse2 with an ARMA model having a trend component
(My apologies if this is a repeated posting. I couldn't find any trace
of my previous attempt in the archive.)
I'm having trouble with forecast() in the dse2 package. It works fine
for me on a model without a trend, but gives me NaN output for the
forecast values when using a model with a trend. An example:
# Set inputs and outputs for the ARMA model fit and test periods
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 <-
2006 Jul 06
2
KPSS test
Hi,
Am I interpreting the results properly? Are my conclusions correct?
> KPSS.test(df)
---- ----
KPSS test
---- ----
Null hypotheses: Level stationarity and stationarity around a linear trend.
Alternative hypothesis: Unit root.
----
Statistic for the null hypothesis of
level stationarity: 1.089
Critical values:
0.10 0.05 0.025 0.01
0.347 0.463
2008 Sep 03
1
how to reduce stress value in isoMDS?
I apply isoMDS to my data, but the result turns out to be bad as the stress
value stays around 31! Yeah, 31 ,not 3.1... I don't know if I ignore
something before recall isoMDS.
My code as follow:
m <- read.table("e:/tsdata.txt",header=T,sep=",")
article_number <- ts(m, start = 2004,end=2008, frequency = 1
,names=colnames(m))
2017 Sep 15
0
require help
> On 15 Sep 2017, at 11:38, yadav neog <yadavneog at gmail.com> wrote:
>
> hello to all. I am working on macroeconomic data series of India, which in
> a yearly basis. I am unable to convert my data frame into time series.
> kindly help me.
> also using zoo and xts packages. but they take only monthly observations.
>
> 'data.frame': 30 obs. of 4 variables:
2006 Jun 26
2
converting to time series object : ts - package:stats
Hi,
I am trying to convert a dataset (dataframe) into time series object using ts function in stats package. My dataset is as follows:
>df
[1] 11.08 7.08 7.08 6.08 6.08 6.08 23.08 32.08 8.08 11.08 6.08 13.08 13.83 16.83 19.83 8.83 20.83 17.83
[19] 9.83 20.83 10.83 12.83 15.83 11.83
I converted this into time series object as follows
>tsdata <-
2011 Nov 22
1
Varma models in the dse package
Hi,
I tried to run the VARMA model in the dse package. I specified a model:
> arma
A(L) =
1+0.244L1 0+0.05L1
0-0.325L1 1-0.234L1
B(L) =
1-0.277L1 0+0.211L1
0-0.206L1 1+0.238L1
and have a TSdata object:
> dfdata
output data:
Series 1 Series 2
1 "difex2" "difem2"
but I get this warning message:
> estMaxLik(arma, dfdata)
Error in
2005 Dec 23
1
dse package problems
I am having problems with the package dse. I just installed R 2.2.1
and reinstalled all packages. I am running Windows XP Pro with all
updates.
Below there are two examples of error messages generated when trying
to execute some simple programs. The code was taken directly from the
package documentation.
Any help on this will be greatly appreciated.
Merry Christmas
Fernando
2009 Nov 27
0
VAR forecasts and out-of-sample prediction
Dear users,
I am struggling with this issue. I want to estimate a VAR(1) for three
variables, say beta1 beta2 beta3, using monthly observations from January
1984 to September 2009. In-sample period January 1984 to December 2003,
out-of-sample January 2004 to September 2009. This is what I have done at
the moment
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],
2018 Mar 26
0
"dlm" Package: Calculating State Confidence Intervals
To Whom It May Concern,
I estimated a model with 6 states (3 time-varying Regression parameters and 3 quarterly seasonality trends). The model is saved in the object titled "mod."
Following the example in the documentation and using the commands below, I am attempting to use the function "dlmSvd2var" to implement SVD and calculate the 90% confidence errors for each
2018 Mar 28
0
"dlm" Package: Calculating State Confidence Intervals
To Whom It May Concern,
I estimated a model with 6 states (3 time-varying Regression parameters and 3 quarterly seasonality trends). The model is saved in the object titled "mod."
Following the example in the documentation and using the commands below, I am attempting to use the function "dlmSvd2var" to implement SVD and calculate the 90% confidence errors for each
2017 Sep 15
7
require help
hello to all. I am working on macroeconomic data series of India, which in
a yearly basis. I am unable to convert my data frame into time series.
kindly help me.
also using zoo and xts packages. but they take only monthly observations.
'data.frame': 30 obs. of 4 variables:
$ year: int 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 ...
$ cnsm: num 174 175 175 172 173 ...
$ incm:
2012 May 06
3
PLot a matrix
Hi,
I want to plot this matrix (I attach the data), it is suposed that each
column is a different time series.
If I do
g<-read.table("dataADF.txt", header=F)
and
plot(g[,1],type="l")
it plots the first column plot if I want in a unique graph each colums of
dataA, all in one. How should I proceed?There is a direct pre-defined code?
And If I wanted a plot by each
2011 Jun 07
2
Setting up a State Space Model in dlm
This question pertains to setting up a model in the package "dlm"
(dynamic linear models,
http://cran.r-project.org/web/packages/dlm/index.html
I have read both the vignette and?"An R Package for Dynamic Linear
Models" (http://www.jstatsoft.org/v36/i12/paper), both of which are
very helpful. There is also some discussion at
2009 Nov 16
1
ARMAX model fitting with arima
I am trying to understand how to fit an ARMAX model with the arima
function from the stats package. I tried the simple data below, where
the time series (vector x) is generated by filtering a step function
(vector u, the exogenous signal) through a lowpass filter with AR
coefficient equal to 0.8. The input gain is 0.3 and there is a 0.01
normal white noise added to the output:
x <- u
2011 Mar 04
3
Análisis de una serie temporal diaria
Hola a todos
Estoy tratando de analizaruna serie temporal con datos diarios de
temperaturas (40 años). He creado un objeto zoo (con ayuda de la lista,
gracias) sobre el que encuentro la regresión lineal. He probado también
a crear un objeto ts a partir del zoo. El problema que encuentro es que
nose puede aplicar la función stl para hallar la componente estacional y
la tendencia. Rdice que la