Displaying 20 results from an estimated 100 matches similar to: "simulate arima model"
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
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
2017 Jun 20
1
How to write an estimated seasonal ARIMA model from R output?
I'm trying to use the following command.
arima (x, order = c(p,d,q), seasonal =list(order=c(P,D,Q), period=s)
How can I write an estimated seasonal ARIMA model from the outputs. To be specifically, which sign to use? I know R uses a different signs from S plus.
Is it correct that the model is:
(1-ar1*B-ar2*B^2-...)(1-sar1*B^s-sar2*B^2s-....)(1-B)^d(1-B^s)^D
2005 Jan 21
2
transfer function estimation
Dear all,
I am trying to write an R function that can estimate Transfer functions *with additive noise* i.e.
Y_t = \delta^-1(B)\omega(B)X_{t-b} + N_t
where B is the backward shift operator, b is the delay and N_t is a noisy component that can be modelled as an ARMA process. The parameters to both the impulse response function and the ARMA noisy component need to be estimated simultaneously.
I
2005 Dec 14
1
Kalman Filter Forecast using 'SSPIR'
Dear R Users,
I am new to state-space modeling. I am using SSPIR
package for Kalman Filter. I have a data set containing one dependent
variable and 7 independent variables with 250 data points. I want to use
Kalman Filter for forecast the future values of the dependent variable
using a multiple regression framework. I have used ssm function to
produce the state space (SS)
2004 Jul 12
1
lda()
Hello,
For a simple problem with 1 predictor (x) and 2 classes (0 and 1), the
linear discriminant function should be something like
2(mu_0 - mu_1)/var x + x-independent-terms
where var is the common variance.
2005 Jan 30
1
t-test or conf interval with known variance?
Hello,
Is there a built-in test in R for hypothesis testing with samples of
known variance?
For example, I've got a set of data, a mean to compare against, and a
known variance, and I want to determine the p-value for which I can
reject the null hypothesis (mu_1 = mu_0) and accept the alternative
(mu_1 > mu_0). I've found that JMP and Minitab can both do this (in
JMP, it's a
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
2013 Apr 12
1
A strange behaviour in the graphical function "curve"
I thought the curve function was a very flexible way to draw functions. So I
could plot funtions like the following:
# I created a function to produce functions, for instance:
fp <- function(m,b) function(x) sin(x) + m*x + b
# So I can produce a function like this
ff <- fp(-0.08, 0.2)
ff(1.5)
# Is the same as executing
sin(1.5) - 0.08*1.5 + 0.2
# Let's plot this
2007 May 22
1
Time series\optimization question not R question
This is a time series\optimization rather than an R question : Suppose I
have an ARMA(1,1) with
restrictions such that the coefficient on the lagged epsilon_term is
related to the coefficient on
The lagged z term as below.
z_t =[A + beta]*z_t-1 + epsilon_t - A*epsilon_t-1
So, if I don't have a facility for optimizing with this restriction, is
it legal to set A to something and then
Optimize
2010 Aug 23
1
Fitting a GARCH model in R
Hi,
I want to fit a mean and variance model jointly.
For example I might want to fit an AR(2)-GARCH(1,1) model i.e.
r_t = constant_term1 + b*r_t-1 + c*r_t-2 + a_t
where a_t = sigma_t*epsilon_t
where sigma^2_t = constant_term2 + p*sigma^2_t-1 + q*a^2_t-1
i.e. R estimates a constant_term1, b, c, constant_term2, p, q
TIA
Aditya
2013 May 02
2
ARMA with other regressor variables
Hi,
I want to fit the following model to my data:
Y_t= a+bY_(t-1)+cY_(t-2) + Z_t +Z_(t-1) + Z_(t-2) + X_t + M_t
i.e. it is an ARMA(2,2) with some additional regressors X and M.
[Z_t's are the white noise variables]
How do I find the estimates of the coefficients in R?
And also I would like to know what technique R employs to find the
estimates?
Any help is appreciated.
Thanks,
2002 Dec 10
1
autoregressive poisson process
Dear R users,
I am trying to find a package that can estimate
an autoregressive model for discrete data. I am
imagining a Poisson or Gamma process in which the
mean (say mu) follows a process such as
mu_t = a + b*x + c*mu_{t-1}
Suppose I have data on the time-series Poisson
outcomes and x and would like to obtain ML estimates
for b and c.
Does anyone know of a package that can do this
2000 Apr 04
0
stochastic process transition probabilities estimation
Hi all,
I'm new with R (and S), and relatively new to statistics (I'm a
computer scientist), so I ask sorry in advance if my question is silly.
My problem is this: I have a (sample of a) discrete time stochastic
process {X_t} and I want to estimate
Pr{ X_t | X_{t-l_1}, X_{t-l_2}, ..., X_{t-l_k} }
where l_1, l_2, ..., l_k are some fixed time lags. It will be enough for
me to compute
2004 Apr 07
1
Time Varying Coefficients
I'd like to estimate time varying coefficients in a linear regression using
a Kalman filter.
Even if the Kalman Filter seems to be available in some packages I can't
figure out how to use it to estimate the coefficients.
Is there anyway to do that in R?
Any help appreciated
Thanks
2011 May 23
1
predict a MA timeseries
Hi,
could anyone tell me how predict() predicts the new value(s), of a MA(1)
arima-modell.
its really easy to make it with an AR(1), knowing the last term, but how can
i or R know the last error?
It would also help if somebody could tell me how to find the "open" source
of the function predict().
Thanks and sorry for my poor english.
--
View this message in context:
2009 Feb 03
3
Problem about SARMA model forcasting
Hello, Guys:
I'm from China, my English is poor and I'm new to R. The first message I sent to R help meets some problems, so I send again.
Hope that I can get useful suggestions from you warm-hearted guys.
Thanks.
I builded a multiplicative seasonal ARMA model to a series named "cDownRange".
And the order is (1,1)*(0,1)45
The regular AR=1; regular MA=1; seasonal AR=0; seasonal
2013 May 02
1
warnings in ARMA with other regressor variables
Hi all,
I want to fit the following model to my data:
Y_t= a+bY_(t-1)+cY_(t-2) + Z_t +Z_(t-1) + Z_(t-2) + X_t + M_t
i.e. it is an ARMA(2,2) with some additional regressors X and M.
[Z_t's are the white noise variables]
So, I run the following code:
for (i in 1:rep) { index=sample(4,15,replace=T)
final<-do.call(rbind,lapply(index,function(i)
2002 Apr 03
1
arima0 with unusual poly
Dear R People:
Suppose I want to estimate the parameters of the
following AR model:
(1 - phi_1 B - phi_2 B^2 - phi_9 B^9) x_t = a_t
and I want to use the arima0 command from the
ts library.
How would I use the order subcommand, please?
R Version 1.4.1 for Windows.
Thanks!
Sincerely,
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston -
2010 Aug 21
1
How to find residual in predict ARIMA
Dear All,
I have a model to predict time series data for example:
data(LakeHuron)
Lake.fit <- arima(LakeHuron,order=c(1,0,1))
then the function predict() can be used for predicting future data
with the model:
LakeH.pred <- predict(Lake.fit,n.ahead=5)
I can see the result LakeH.pred$pred and LakeH.pred$se but I did not
see residual in predict function.
If I have a model:
[\
Z_t =