Displaying 20 results from an estimated 10000 matches similar to: "ARMAtoMA"
2009 Nov 11
1
AMRAtoMA
Hello R Users!
I have a question about the output of ARMAtoMA when used to calculate
the variance of
a model. I have a mixed model of the form ARMA(1,1). The actual
model takes the form:
X(t) = 0.75X(t-12) + a(t) - 0.4a(t-1)
Given that gamma(0) takes the form [(1 + theta^2 -
2*theta*phi)/(1-phi^2)]*sigma(a), I would
expect a process variance of 4.02*sigma(a) when I substitute 0.75 for
phi and
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
2009 Mar 06
0
modifying a built in function from the stats package (fixing arima) (CONCLUSIONS)
Thanks a lot to everybody that helped me out with this.
Conclusions:
(1)
In order to edit arima in R:
>fix(arima)
or alternatively:
>arima<-edit(arima)
(2)
This is not contained in the "Introduction to R" manual.
(3)
A "productive" fix of arima is attached (arma coefficients printed out and
error catched so that it doesn't halt parent loops to search for
2011 Feb 26
0
A problem about realized garch model
Hi, I am trying to write the Realized GARCH model with order (1,1)
The model can be describe bellow:
r_t = sqrt( h_t) * z_t
logh_t = w + b*logh_(t-1) + r*logx_(t-1)
logx_t = c + q*logh_t + t1*z_t +t2*(z_t ^2 -1) + u_t
and z follow N(0,1) , u follow N(0, sigma.u^2)
But I'm troubled with the simulation check for my code.
After I simulate data from the model and estimate the data,
I
2012 Apr 26
2
ErrError in f(x, ...) : object 'g.' not found
Hi , R is a new language for me so sorry in advance if this error is to basic
for posting. I have tried the R manual and search online for quite a few, if
anyone could help i would be very thankful.
Here is my code.
kappa = 1.1
theta = 0.1
sigma = 0.4
rho = -0.6
v0 = 0.2
r = 0.05
T = 0.5
s0 = 1
K = 0.5
type = 1
Hestoncall = function(kappa,theta,sigma,rho,v0,r,T,s0,K,type)
{
u = 0.5
b
2013 Apr 08
0
Maximum likelihood estimation of ARMA(1,1)-GARCH(1,1)
Hello
Following some standard textbooks on ARMA(1,1)-GARCH(1,1) (e.g. Ruey
Tsay's Analysis of Financial Time Series), I try to write an R program
to estimate the key parameters of an ARMA(1,1)-GARCH(1,1) model for
Intel's stock returns. For some random reason, I cannot decipher what
is wrong with my R program. The R package fGarch already gives me the
answer, but my customized function
1999 Nov 14
1
bug in arma.sim (PR#322)
Dear Sir,
I think I found a bug in the function arma.sim, which is defined in
the help page of the function filter:
arma.sim <- function(n, ar = NULL, ma = NULL, sigma = 1.0)
{
x <- ts(rnorm(n+100, 0, sigma^2), start = -99)
if(length(ma)) x <- filter(x, ma, sides=1)
if(length(ar)) x <- filter(x, ar, method="recursive")
as.ts(x[-(1:100)])
}
I am using R
2008 Dec 27
1
indexed expression
Hello expeRts,
I need generate symbolize the autocovariances matrix of a Gaussian
ARMA(1,1), for derivate it and evaluate.
I try this codes, but whitout sucess
vacv<-NULL
vacv[1]<-1-2*phi*theta-theta^2
vacv[2]<-(1-phi*theta)*(phi-theta)
vacv[3:n]<-acv[2]*(phi^(1:(n-2)))
facv<-list()
for(i in 1:2)
2012 Mar 14
1
Metropolis-Hastings in R
Hi all,
I'm trying to write a MH algorithm in R for a standard normal distribution,
I've been trying for a good week or so now with multiple attempts and have
finally given up trying to do it on my own as I'm beginning to run out of
time for this, would somebody please tell me what is wrong with my latest
attempt:
n=100
mu=0
sigma=1
lik<-function(theta) exp(((theta-mu)^2)/2*sigma)
2008 Sep 17
1
A Simple Question
Hi:
I am trying to run your SCHOOLS example as following and I get an error message stated that : Error: could not find function "bugs"
Would you please help me since I would like to run some WINBUG programs from your R by reading external data and I am new to R?
Do I missing some function? Should I install some extra files?
Thanks a lot in advance for your help!!
> schools
2005 May 31
1
Solved: linear regression example using MLE using optim()
Thanks to Gabor for setting me right. My code is as follows. I found
it useful for learning optim(), and you might find it similarly
useful. I will be most grateful if you can guide me on how to do this
better. Should one be using optim() or stats4::mle?
set.seed(101) # For replicability
# Setup problem
X <- cbind(1, runif(100))
theta.true <- c(2,3,1)
y <- X
2004 Oct 25
1
output processing / ARMA order identification
Dear R users,
I need to fit an ARMA model. As far as I've seen, EACF (extended ACF)
is not available in R.
1. Let's say I fit a series of ARMA models in a loop. Given the
code/output included below, how do I pull 'Model' and 'Fit' (AIC)
from each summary() so that I can combine them into an array/data
frame to be sorted by AIC?
2. Apart from EACF, are you aware perhaps
2007 Feb 17
1
Solve in maximum likelihood estimation
Hi,
I got the following problem.
I am doing a maximum likelihood estimation for a Kalman Filter.
For this purpose, I have to invert an error matrix Ffast of dimension
"no. parameters X no.parameters". The usualy optim methods often find only
local minima, so I decided to make the optimization using the SANN
algorithm, which is very slow already.
However, this becomes a real problem
2012 May 09
0
How to run this model using nonlinear least square in R.
http://r.789695.n4.nabble.com/file/n4619404/pic1.jpg
cesres_ext <- nls(lnGDP85~ intercept + (alpha/(1-alpha-beta)) *
lns_ikonngdelta + (beta/(1-alpha-beta)) * lns_ihonngdelta + 0.5 *
((sigma-1)/sigma) * (1/((1-alpha-beta)*(1-alpha-beta))) * (alpha * taylor1 +
beta * taylor2 - alpha*beta*taylor3) ,start = list(intercept=8, alpha=0.2,
beta=0.4, sigma=1.2),data=data)
I have this model. I use
2006 May 05
0
Spline integration & Gaussian quadrature (was: gauss.quad.prob)
Spencer
Thanks for your thoughts on this. I did a bit of work and did end up
with a method (more a trick), but it did work. I am certain there are
better ways to do this, but here is how I resolved the issue.
The integral I need to evaluate is
\begin{equation}
\frac{\int_c^{\infty} p(x|\theta)f(\theta)d\theta}
{\int_{-\infty}^{\infty} p(x|\theta)f(\theta)d\theta}
\end{equation}
Where
2008 Sep 26
0
maximum likelihood
Hello,
I am trying to estimate parameters of mean reverting process with jumps given by: dp=k(mu-p)dt+sigma*dz+Jdq where dp represents change in log of price, k is reversion factor, mu is long run level of price, sigma is standard deviation, and dq equals one with probability lambda if jump occurs and 1-lambda otherwise. J is jump size with mean muj and standard deviation delta. Therefore, when
2008 Jan 31
1
R2WinBUGS is broken
Dear R-users,
I am trying to use the following code to reproduce results from Prof.
Gelman's book, but have the listed error for R2WinBUGS version (the openbugs
version is good). I am using R-2.6.1 on windows XP, and all the R packages
are most current ones. schools.bug can be found at
http://www.stat.columbia.edu/~gelman/bugsR/runningbugs.html . Can anyone
help me to figure out what's
2006 Jul 20
2
Timing benefits of mapply() vs. for loop was: Wrap a loop inside a function
List:
Thank you for the replies to my post yesterday. Gabor and Phil also gave
useful replies on how to improve the function by relying on mapply
rather than the explicit for loop. In general, I try and use the family
of apply functions rather than the looping constructs such as for, while
etc as a matter of practice.
However, it seems the mapply function in this case is slower (in terms
of CPU
2011 Aug 17
2
An example of very slow computation
This message is about a curious difference in timing between two ways of computing the
same function. One uses expm, so is expected to be a bit slower, but "a bit" turned out to
be a factor of >1000. The code is below. We would be grateful if anyone can point out any
egregious bad practice in our code, or enlighten us on why one approach is so much slower
than the other. The problem
2011 Jan 13
1
Openbugs and rbugs on mac with wine
Hello list,
I?ve been trying to get OpenBUGS running on my mac using the wine
emulator. I can run Openbugs just fine by doing:
wine ~/OpenBUGS312/OpenBUGS.exe
In the terminal, so OpenBUGS works. When I try to run the schools
example using rbugs(), the OpenBUGS process starts in wine, but it
just sits there, no log, no script, no output of any sort. The rbugs
() call makes the init,