Displaying 20 results from an estimated 6000 matches similar to: "Comparing lagged time series"
2008 Jul 23
1
Time series reliability questions
Hello all,
I have been using R's time series capabilities to perform analysis for quite
some time now and I am having some questions regarding its reliability. In
several cases I have had substantial disagreement between R and other packages
(such as gretl and the commercial EViews package).
I have just encountered another problem and thought I'd post it to the list. In
this case,
2014 Apr 19
1
lag() not returning a time series object
Dear all,
Before I file this as a bug, I wanted to check if I didn't miss something.
The help page of lag() says that the function returns a time series object.
It actually does return something that looks like a ts object (the
attribute tsp is set). But when using a vector, the class "ts" is not added
to the result:
> avec <- 1:10
> lag(avec)
[1] 1 2 3 4 5 6 7 8
2009 Oct 03
1
Multiple time series and their names
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 plot of the series with their names
acf(x) # gives the ACFs &
2013 Oct 23
2
Multivariate time series in R 3 vs R 2
Hello!
Recently I got report that my package mar1s doesn't pass checks any more on
R 3.0.2. I started to investigate and found the following difference in
multivariate time series handling in R 3.0.2 compared to R 2 (I've checked
on 2.14.0).
Suppose I wish to calculate seasonal component for time series. In case of
multivariate time series, I wish to process each column independently.
2012 Jul 25
3
lagged variables
hi guys,
i have some trouble in creating lagged variables to use as external
regressors.
i'm trying to use lag(x) but it gives me as result the same time series (x),
adding this part at the end:
attr(,"tsp")
[1] 0 2323 1
where do i wrong?are there other functions to be used?
thanks
sara
--
View this message in context:
2004 May 25
1
Tramo-seats support in GRETL, but not R
On Mon, 24 May 2004 12:00:46 +0200 v.demartino2@virgilio.it wrote:
> Working - among other things- in the field of (short & long term)
electricity
> forecast,
* * *
> we have to comply with the Tramo-seats closed-source procedure
(http://www.bde.es/informes/be/docs/dt0014e.pdf)
> to deal with seasonality of electricity monthly time-series, in line
with
> the methodology
2023 Jan 05
1
R 'arima' discrepancies
Rob J Hyndman gives great explanation here
(https://robjhyndman.com/hyndsight/estimation/) for reasons why results
from R's arima may differ from other softwares.
@iacobus, to cite one, 'Major discrepancies between R and Stata for
ARIMA'
(https://stackoverflow.com/questions/22443395/major-discrepancies-between-r-and-stata-for-arima),
assign the, sometimes, big diferences from R
2011 Dec 06
1
About summary in linear models
Hello!!, for linear models fit I use Gretl, but now I'm starting to use R,
I would like to know if is there some function to obtain a extended summary
like in Gretl.
I will write a example in Gretl
Modelo 1: MCO, usando las observaciones 1968-1982 (T = 15)
Variable dependiente: Invest
Coeficient
St error
t-ratio
p-value
const
377,631
35,0955
10,7601
<0,00001
***
GNP
1999 Jul 27
3
Preliminary version of ts package
There is now a preliminary version of a time series package in the R-devel
snapshots, and we would welcome feedback on it. It is based in part on the
packages bats (Martyn Plummer) and tseries (Adrian Trapletti) and in part
on code I had or have written. (Thanks for the contributions, Martyn and
Adrian!) Some of the existing ts code has been changed, for example to plot
multiple time series, so
1999 Feb 18
1
model.frame mangles time series (PR#121)
This one showed up while looking at one of Ripley's other reports:
> data(freeny)
> model.frame(y~1,data=freeny,subset=1:10)
y
1962.25 8.79236
1962.5 8.79137
1962.75 8.81486
1963 8.81301
1963.25 8.90751
1963.5 8.93673
1963.75 8.96161
1964 8.96044
1964.25 9.00868
1964.5 9.03049
> model.frame(y~1,data=freeny,subset=1:10)$y
Warning: Replacement length not a
1999 Jul 19
9
time series in R
Time Series functions in R
==========================
I think a good basic S-like functionality for library(ts) in base R
would include
ts class, tsp, is.ts, as.ts
plot methods
start end window frequency cycle deltat
lag diff aggregate
filter
spectrum, spec.pgram, spec.taper, cumulative periodogram, spec.ar?
ar -- at least univariate by Yule-Walker
arima -- sim, filter, mle, diag, forecast
2002 Apr 03
1
predict.Arima fails when x is not a time-series
I'm playing with predict.Arima in the 3/19/02 development snapshot of R-devel.
The following produces an error message because x is not of class "ts":
R> x <- rnorm(20)
R> obj <- arima(x, c(2,0,0))
R> predict(obj)
Error in round(x, digits) : Non-numeric argument to mathematical function
Granted the documentation for arima says x should be a time-series, but
2011 Dec 06
1
Duda sobre summary
Hola!! A ver si alguien puede ayudarme!!
Para ajuste de modelos lineales normalmente uso Gretl. Ahora estoy
empezando a hacerlo en R. Me gustaría saber si existe alguna función
que haga un summary extendido como el de Gretl. Os pongo un ejemplo
del summary de Gretl.
Modelo 1: MCO, usando las observaciones 1968-1982 (T = 15)
Variable dependiente: Invest
Coeficiente Desv. Típica
2008 Mar 30
2
data(lh) time serie parameters
Dear all,
I'm confused by the time serie parameters in data(lh) :
sueoka:~ lobry$ R --vanilla --quiet
> tsp(lh)
[1] 1 48 1
because documentation says:
QUOTE
A regular time series giving the luteinizing hormone in blood
samples at 10 mins intervals from a human female, 48 samples.
UNQUOTE
So that I would expect the time serie to end at 480 minutes
or 8 hours. Shouldn't we have
2007 Oct 01
2
convert time series to data.frame
Dear R gurus
I would like to take a monthly time series and convert it to a data
frame without losing the tsp items, pleae
I've tried as.data.frame and data.frame but I get the series without
the time element.
Any suggestions, please?
tia
Edna Bell
2008 Mar 31
1
concatenating two successive time series
Dear Helpers,
I am looking for methods and tools to compare and then to concatenate
two successive time series. They are both in the same frequency and they
describe one phenomena. There is no time gap between them. The problem
is that the method of measurements has changed between both time series
and they are no statistically the same. I would like to merge them to
receive one homogeneous
2004 Aug 21
3
Puzzled at lm() and time-series
I tried toy problems and there doesn't seem to be a basic problem
between lm() and ts objects:
X = data.frame(x=c(1,2,7,9), y=c(7,2,3,1))
lm(y ~ x, X)
X <- lapply(X, function(x) ts(x, frequency=12, start=c(1994,7)))
lm(y ~ x, X)
and this works fine - whether you do an lm() before or after making ts
objects, it's okay.
But I have a situation where things aren't okay.
2009 Nov 20
2
How to setup the tsp attribute of a dataset
Hello,
I am wondering how I should set up the tsp attribute (available through
attr(x, "tsp")) of a dataset x? Let's assume that x has 100 points, and
I want to set the frequency to 4.
I tried:
> attr(x,"tsp")<-c(1,100,4)
Error in attr(x, "tsp") <- c(1, 100, 4) :
invalid time series parameters specified
Is there any other way to set the frequency of
2011 Aug 19
3
ATSP to TSP reformulation
Greetings,
I am having trouble getting the function reformulate_ATSP_as_TSP to work for
me. I have provided a simple example of some of the code I've been using.
In particular, I'm not sure why I'm getting the error
"Error in dimnames(tsp) <- list(lab, lab) :
length of 'dimnames' [1] not equal to array extent"
since I created the object ATSP with a valid
1998 Sep 28
1
"tsp<-"
If value is NULL I think tsp assignment should not return a class ts object.
Below is a fixed version.
Paul Gilbert
____
"tsp<-" <-function(x, value)
{if (is.null(value))
{attr(x, "tsp") <- value
if(inherits(x,"ts")) class(x) <- NULL
return(x)
}
attr(x, "tsp") <- value
class(x) <- "ts"
x
}