combine them and then use acf:
x - ts(rnorm(10))
y - ts(x+ rnorm(10))
u - ts.union(x, y)
(acf(u, na.action=na.pass))
I don't know if it's correct, but it gives an answer... I'm too afraid to
check if it's correct.
--
View this message in context:
bogdanno-2 wrote:
I want to make the matrix to be indexed from row (column) 0, not 1
Can I do that? How?
Thanks
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
It sounds like you've looked at the DLM, DSE, and SSPIR packages. If not,
then certainly check them out. Also, we have code for filtering, smoothing
and estimation in our text- go to www.stat.pitt.edu/stoffer/tsa3/ and look
at the code for chapter 6. There's not a package for the text, but all
) -0.84970010
3(1) -0.05944844
3(2) 1.27543030
tsp(x)
[1] 1.00 3.25 4.00
tsp(as.ts(as.zoo(x)))
[1] 1.00 3.25 4.00
On Fri, Oct 2, 2009 at 11:15 PM, David Stoffer dsstof...@gmail.com
wrote:
Suppose I have multiple time series with names for each one, for example,
x - ts(matrix(rnorm
That info along with drop=FALSE seems to be a reasonable hack.
Thanks again-
David
Gabor Grothendieck wrote:
You can use names using your example ts series like this
x[, Juan]
On Sat, Oct 3, 2009 at 11:04 AM, David Stoffer dsstof...@gmail.com
wrote:
Thanks for the help. My
Suppose I have multiple time series with names for each one, for example,
x - ts(matrix(rnorm(30,0,1),10,3), names=c(Juan, Tuey, Trey),
frequency=4)
So now, as I start to explore these series, if I do everything at once, the
names
stay attached to the series. For example,
plot(x) # gives a
Hi Marc- I have been [and am] extremely busy and haven't had much time to be
a playeR (lately I've become more of a moveR and shakeR ... some say more of
a boozeR and a loseR ... it's all prespective :). I've updated the web page
with a little more info, but when I find the time I'll put up some
You can do (1) and (2) [with some additional coding] using mvspec.R, which
you can download from http://www.stat.pitt.edu/stoffer/tsa2/chap7.htm ...
scroll down to the Spectral Envelope section and you'll find it there. You
can look at the top part of the examples to get an idea of how to use
The help file states: The exact likelihood is computed via a state-space
representation of the ARIMA process, and the innovations and their variance
found by a Kalman filter. It is possible to include exogenous variables
(xreg) this way, but one can only assume this is done [only one person
What happened? TIA.
In version 2.7.x:
(x - array(1:4, c(2,2)))
[,1] [,2]
[1,]13
[2,]24
as.array(x)
[,1] [,2]
[1,]13
[2,]24
In version 2.8.0:
(x - array(1:4, c(2,2)))
[,1] [,2]
[1,]13
[2,]24
as.array(x)
Error: evaluation
as.array
in my carelessness. Sorry for waking everybody up.
Rolf Turner-3 wrote:
On 3/11/2008, at 2:11 PM, David Stoffer wrote:
What happened? TIA.
In version 2.7.x:
(x - array(1:4, c(2,2)))
[,1] [,2]
[1,]13
[2,]24
as.array(x)
[,1] [,2]
[1,]13
Kevin- this is a simple rescaling of the axes so that the area under the
curve remains constant (and is half of the variance since you only look at
the positive frequencies). In this case, freq(x) = 1/dx, where dx is the
time between points. It is basically a graphic device so that you get
multicolinearity
(near or computational singularity), e.g., this fails:
x = ts.intersect(mort, trend, part, part)
arima(x[,1],order=c(2,0,1), xreg=x[,2:4])
Jose Capco wrote:
On Sep 11, 6:24 am, David Stoffer [EMAIL PROTECTED] wrote:
Your model is close, but not correct... there are no t's
Your model is close, but not correct... there are no t's on the parameters
and the U's aren't lagged.
You can find an ARMAX example on our quick fix page:
http://www.stat.pitt.edu/stoffer/tsa2/R_time_series_quick_fix.htm . The
example is near the bottom and just above the spectral analysis
and
Pierce (?Box.test for the reference). By the way, you're not alone,
Minitab makes the same mistake you did.
raf.rossignol wrote:
David Stoffer wrote:
I stand corrected. I thought I checked this a long time ago, but
apparently not. tsdiag.Arima DOES NOT use the fact
/Rissues.htm along with some
work-arounds over here: http://www.stat.pitt.edu/stoffer/tsa2/Examples.htm
David Stoffer wrote:
I believe tsdiag() uses the correct degrees of freedom in applying
Box.test, but the graphic shows lag on the horizontal axis when it
should display degrees of freedom
I believe tsdiag() uses the correct degrees of freedom in applying Box.test,
but the graphic shows lag on the horizontal axis when it should display
degrees of freedom.
raf.rossignol wrote:
Hello,
Prof Brian Ripley wrote:
I think you are referring to its application to the
again for your help.
Duncan Murdoch-2 wrote:
On 7/11/2008 11:51 AM, David Stoffer wrote:
Is there an easy way to compare complex numbers?
Here is a small example:
(z1=polyroot(c(1,-.4,-.45)))
[1] 1.11-0i -2.00+0i
(z2=polyroot(c(1,1,.25)))
[1] -2+0i -2+0i
x=0
if(any
help(spec.pgram) - then look at the examples at the bottom of the page
Dylan Beaudette-3 wrote:
Hi,
Are there any functions in R that could be used to estimate the
phase-shift
between two semi-sinusoidal vectors? Here is what I have tried so far,
using
the spectrum() function --
http://www.stat.pitt.edu/stoffer/tsa2/Examples.htm
tom soyer wrote:
Hi,
Does anyone know if R has a function that is similar to lag.plot but
instead
of auto-correlation, it plots cross-correlation with lags?
Thanks,
--
Tom
[[alternative HTML version deleted]]
You can use acf(), but it will be messy and the labeling of the plots
is confusing and perhaps misleading... check out issue number 4
at http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm
I would recommend setting up a grid of the ccfs and you could
automate this (i.e., write a loop) if need
Vladimir- there are at least 3 packages that will facilitate state space
modeling:
http://cran.r-project.org/src/contrib/Descriptions/dlm.html DLM ,
http://cran.r-project.org/src/contrib/Descriptions/dse.html DSE , and
http://cran.r-project.org/src/contrib/Descriptions/sspir.html SSPIR .
In
22 matches
Mail list logo