Re: [R] time series with quality codes

2007-08-16 Thread Achim Zeileis
On Thu, 16 Aug 2007, Felix Andrews wrote: list(...), I am working with environmental time series (eg rainfall, stream flow) that have attached quality codes for each data point. The quality codes have just a few factor levels, like good, suspect, poor, imputed. I use the quality codes in plots

Re: [R] time series periodic data

2007-08-16 Thread Petr PIKAL
Thank you. I will try to get the book, althoug I am not sure if I with my tiny knowledge of mathematics will be able to digest it. Meanwhile I tried to make 7 min average and then to reanalyze by spectrum, but the output was not very convincing. Regards Petr Pikal [EMAIL PROTECTED] Rolf

Re: [R] time series with quality codes

2007-08-16 Thread Gabor Grothendieck
In addition, we could create a function to.df which converts a zoo object to a data frame assuming that any column that only contains 1:nlevels is a factor with the indicated level names. Use to.df just before plotting: library(zoo) set.seed(1) f - zoo(factor(sample(3, 10, replace = TRUE))) x -

Re: [R] time series periodic data

2007-08-15 Thread Rolf Turner
On 16/08/2007, at 12:26 AM, Petr PIKAL wrote: Dear all Please help me with analysis of some periodic data. I have an output from measurement each minute and this output is modulated by rotation of the equipment (approx 6.5 min/revolution). I can easily spot this frequency from

Re: [R] Time Series Data

2007-07-16 Thread Gabor Grothendieck
Check out the zoo package: Lines - 1975-12-05 1.5 1975-12-12 2.3 library(zoo) # replace next line with z - read.zoo(myfile.dat) z - read.zoo(textConnection(Lines)) plot(z) z vignette(zoo) # gives more info On 7/16/07, livia [EMAIL PROTECTED] wrote: Hi all, I have got some time series

Re: [R] Time Series Data

2007-07-16 Thread Achim Zeileis
On Mon, 16 Jul 2007, livia wrote: Hi all, I have got some time series data. Data[[1]] is the data in the format 1975-12-05 1975-12-12 1975-12-19..., data[[2]] is the time series data. I would like to generate the time series format as 1975-12-05 1.5 1975-12-12 2.3etc. I am thinking

Re: [R] Time series\optimization question not R question

2007-05-22 Thread Ravi Varadhan
Your approach obviously won't give you the same result as when the likelihood is optimized jointly with A and \beta. However, you can maximize the likelihood over \beta for different values of A, which would give you a profiled likelihood. Then you pick the \beta and A corresponding to maximum

Re: [R] Time series\optimization question not R question

2007-05-22 Thread Ravi Varadhan
@stat.math.ethz.ch Subject: Re: [R] Time series\optimization question not R question Your approach obviously won't give you the same result as when the likelihood is optimized jointly with A and \beta. However, you can maximize the likelihood over \beta for different values of A, which would give you

Re: [R] time series

2007-05-19 Thread John Kane
Can you give us a little more information? Are you expecting N times to be record and want to know if you only have N-x times or are you expecting N entries but want to know if some are NA? Etc, etc... Also are you actually recording the times or is the sampling setup just taking a sample every

Re: [R] time series

2007-05-18 Thread Rogerio Porto
Jessica, I am working with a data file which is the record of precipitation measurement normaly done every 10 minutes. I would like to check if there are missing times in my data file. Is there a function existing able to check for that in R ? I'd use max(diff(time))==min(diff(time)).

Re: [R] time series problem

2007-04-24 Thread Achim Zeileis
On Tue, 24 Apr 2007, Tomas Mikoviny wrote: Hi everybody, I work with data with following pattern comm Date Value 1 4/10/2007 361.2 2 4/11/2007 370.1 3 4/12/2007 357.2 4 4/13/2007 362.3 5 4/16/2007 363.5 6

Re: [R] time series analysis

2007-02-02 Thread Pfaff, Bernhard Dr.
Hello John, as a starting point you might also want to have a look at: @book{BOOK, author={Robert S Pindyck and Daniel L Rubinfeld}, title={Econometric Models and Economic Forecasts}, year={1997}, publisher={McGraw-Hill/Irwin}, isbn={0079132928} } The monographies of Hamilton and Lütkepohl

Re: [R] time series analysis

2007-02-01 Thread Ben Fairbank
John -- Well, as a start, have a look at Modern Applied Statistics with S, by Venables and Ripley, both of which names you will recognize if you read this list often. There is a 30-page chapter on time series (with suggestions for other readings), obviously geared to S and R, that is a good

Re: [R] Time series plot

2007-01-04 Thread Gabor Grothendieck
Check out #2 in: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/85801.html and RSiteSearch(axis(4) to find additional examples. On 1/4/07, Arun Kumar Saha [EMAIL PROTECTED] wrote: Dear Gabor, Thank you very much for your letter. Actually I got partial solution from your suggestion. Still I

Re: [R] Time series plot

2007-01-04 Thread Petr Pikal
@stat.math.ethz.ch Subject:Re: [R] Time series plot Dear Gabor, Thank you very much for your letter. Actually I got partial solution from your suggestion. Still I am fighting with defining a secondary axis. More pecisely, suppose I have following two dataset: x = c(1:10) y = x*10

Re: [R] Time series plot

2007-01-04 Thread Don MacQueen
Here's an example illustrating a way to get a second y axis that has a different range: x - 1:10 y1 - 2*x y2 - 100-3*x+rnorm(10) par(mar=c(5.1,4.1,4.1,4.1)) plot(x,y1) par(new=TRUE) plot(x,y2,xaxt='n',yaxt='n',xlab='',ylab='',pch=3) axis(4) mtext('y2',side=4,line=2.5) -Don At 2:18 PM +0530

Re: [R] Time series plot

2007-01-03 Thread Gabor Grothendieck
You can use read.zoo in the zoo package to read in the data and then see: https://www.stat.math.ethz.ch/pipermail/r-help/2006-December/122742.html See ?axis for creating additional axes with classic graphics and library(lattice) ?panel.axis in lattice graphics. Search the archives for

Re: [R] time series simulation

2006-09-29 Thread Spencer Graves
First, I'd write down a model for how your stochastic process relates to independent, normal observations with mean 0 and standard deviation 1. You want a lognormal series, so I'd start by generating a normal series and the compute 'exp' of that. If you'd like more help from this

Re: [R] time-series packages

2006-09-28 Thread Dirk Eddelbuettel
On 28 September 2006 at 22:00, David Kaplan wrote: | Greetings, | | Are there R packages that perform time-series analyses - particularly | estimation of ARIMA models along with unit-root tests? I know that | FinMetrics in the S-Plus program will do it, but I'm looking for R | packages, as

Re: [R] Time series labeling with Zoo

2006-06-23 Thread Gad Abraham
Gabor Grothendieck wrote: When the axis labelling does not work well you will have to do it yourself like this. The plot statement is instructed not to plot the axis and then we extract into tt all the dates which are day of the month 1. Then we manually draw the axis using those.

Re: [R] Time series labeling with Zoo

2006-06-22 Thread Gabor Grothendieck
When the axis labelling does not work well you will have to do it yourself like this. The plot statement is instructed not to plot the axis and then we extract into tt all the dates which are day of the month 1. Then we manually draw the axis using those. library(zoo) set.seed(1) z -

Re: [R] time series clustering

2006-06-06 Thread Andrej Kastrin
Spencer Graves wrote: I know of no software for time series clustering in R. Google produced some interesting hits for time series clustering. If you find an algorithm you like, the author might have software. Alternatively, the algorithm might be a modification of something

Re: [R] time series clustering

2006-06-05 Thread Spencer Graves
I know of no software for time series clustering in R. Google produced some interesting hits for time series clustering. If you find an algorithm you like, the author might have software. Alternatively, the algorithm might be a modification of something already available in R. If

Re: [R] Time series plot

2006-05-02 Thread Gabor Grothendieck
Try this (where you can replace textConnection(L) with name of file containing data): L - 01/02/1990 0.531 0.479 01/03/1990 0.510 0.522 01/06/1990 0.602 0.604 library(zoo) z - read.zoo(textConnection(L), format = %m/%d/%Y) plot(z, plot.type = single) This will give more info on zoo:

Re: [R] Time Series information in formulae

2006-04-12 Thread Prof Brian Ripley
The problem here is that you called model.frame() with (I presume, the 'factory-fresh' default) na.action=na.omit, and model.frame is documented to remove tsp attributes in that case. Use model.frame(..., na.action = NULL), e.g. model.frame(~UKgas, na.action=NULL)[[1]] is a time

Re: [R] Time Series information in formulae

2006-04-12 Thread Gabor Grothendieck
You might want to look at the dyn package. It allows time series in model formulae, e.g. this aligns UKgas and diff(UKgas) properly: dyn$lm(UKgas ~ diff(UKgas)) dyn$ transforms the above to dyn(lm(dyn(UKgas ~ diff(UKgas and the inner dyn adds class dyn to the formula's class vector

Re: [R] Time Series Objects/ MC Simulation

2006-04-07 Thread Spencer Graves
I don't have a direct answer to your question, but in case you are interested in a general introduction to time series capabilties in R, I will suggest the following: 1. Ch. 14 in Venables and Ripley (2002) Modern Applied Statistics with S, 4th ed. (Springer) 2.

Re: [R] Time-Series, multiple measurements, ANOVA model over time points, analysis advice

2006-03-23 Thread Spencer Graves
If this were my problem, I might start by considering each stimulus-response pair as a one observation, and I'd break the MEG into separate time series, each starting roughly 1 second before the stimulus and ending roughly 1 second after. If you've averaged many of these, I'm

Re: [R] Time series influenced by half-time, intake and treatment...

2005-12-07 Thread Spencer Graves
Have you read Pinheiro and Bates (2000) Mixed-Effects Models in S and S-Plus (Springer)? The latter part about nonlinear modeling with mixed effects sounds like it could help you a lot. 1. Consistent with that, I might start by averaging over all 15 people, then making

Re: [R] Time series ARIMAX and multivariate models

2005-09-10 Thread Spencer Graves
If you have not received an adequate reply to this and would still like help, please submit a more specific question, preferably with a small self-contained example that someone can copy from your email, paste into R, and try some alternatives in a minute or two. R has many

Re: [R] Time Series Analysis: book?

2005-09-08 Thread Wensui Liu
TS is a huge topic. The book recomended by statisitcian might be different from the one recommended by econometrician. Finance guy might recommend another. Could you please be more specific? On 9/8/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: There has been a few questions on the subject

Re: [R] Time Series Analysis: book?

2005-09-08 Thread Jean-Luc Fontaine
Wensui Liu wrote: TS is a huge topic. The book recomended by statisitcian might be different from the one recommended by econometrician. Finance guy might recommend another. Could you please be more specific? My software (http://moodss.sourceforge.net) collects, archives in a SQL database

Re: [R] Time Series Analysis: book?

2005-09-08 Thread Spencer Graves
1. Have you read the appropriate chapter in Venables and Ripley (2002) Modern Applied Statists with S (Springer)? If no, I suggest you start there. 2. Have you worked through the vignettes associated with the zoo package? If no, you might find that quite useful. [Are

Re: [R] Time Series Analysis: book?

2005-09-08 Thread jfontain
Quoting Spencer Graves [EMAIL PROTECTED]: 1. Have you read the appropriate chapter in Venables and Ripley (2002) Modern Applied Statists with S (Springer)? If no, I suggest you start there. 2. Have you worked through the vignettes associated with the zoo package? If no,

Re: [R] time series graphs

2005-09-04 Thread Gabor Grothendieck
On 9/4/05, Anette Nørgaard [EMAIL PROTECTED] wrote: About time series graphs, I need help to move on: A time series of data directly from a data logger comes in the dat format created below: year-c(rep(2005,10)) doy-c(rep(173,5),rep(174,5)) time-c(15,30,45,100,115,15,30,45,100,115)

Re: [R] time series plots: labels language tickmarks

2005-08-22 Thread Prof Brian Ripley
On Mon, 22 Aug 2005, javier garcia - CEBAS wrote: My native language is spanish and I would need to do two changes in the default xlabels in timeseries plots: What sort of plots are you talking about here? (Not tsplot or plot.ts, for example.) I think you are perhaps talking about plots of

Re: [R] time series plots: labels language tickmarks

2005-08-22 Thread Gavin Simpson
On Mon, 2005-08-22 at 13:04 +0100, Prof Brian Ripley wrote: On Mon, 22 Aug 2005, javier garcia - CEBAS wrote: My native language is spanish and I would need to do two changes in the default xlabels in timeseries plots: What sort of plots are you talking about here? (Not tsplot or

Re: [R] time series and regions of change

2005-07-22 Thread Achim Zeileis
On Fri, 22 Jul 2005 14:46:31 -0400 Sean Davis wrote: Preface: this is a statistical question more than an R question. I have a vector of numbers (assume a regular time series). Within this time series, I have a set of regions of interest (all of different lengths) that I want to compare

Re: [R] Time Series Count Models

2005-07-18 Thread Brett Gordon
Thanks for the suggestion. Is such a model appropriate for count data? The library you reference seems to just be form standard regressions (ie those with continuous dependent variables). Thanks, Brett On 7/16/05, Spencer Graves [EMAIL PROTECTED] wrote: Have you considered lme in

Re: [R] Time Series Count Models

2005-07-18 Thread Paul Johnson
Dear Brett: There are books for this topic that are more narrowly tailored to your question. Lindsey's Models for Repeated Measurements and Diggle, et al's Analysis of Longitudinal Data. Lindsey offers an R package on his web site. If you dig around, you will find many modeling papers on

Re: [R] Time Series Count Models

2005-07-18 Thread Spencer Graves
We are leveraging too far on speculation, at least from what I can see. PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html;. In particular, try the simplest example you can find that illustrates your question, and explain your concerns to us in terms of a

Re: [R] Time Series Count Models

2005-07-18 Thread Brett Gordon
Paul, Thank you so much for your thoughtful reply. I agree - there are many possible descriptions for my data, and I realize that I don't want to get bogged down with figuring out the 'best' model if something simple will work well. For me, I think the difficulty is going to be handling the

Re: [R] time series regression

2005-07-11 Thread Achim Zeileis
On Fri, 8 Jul 2005, yyan liu wrote: Hi: I have two time series y(t) and x(t). I want to regress Y on X. Because Y is a time series and may have autocorrelation such as AR(p), so it is not efficient to use OLS directly. The model I am trying to fit is like

Re: [R] time series regression

2005-07-08 Thread Gabor Grothendieck
On 7/8/05, yyan liu [EMAIL PROTECTED] wrote: Hi: I have two time series y(t) and x(t). I want to regress Y on X. Because Y is a time series and may have autocorrelation such as AR(p), so it is not efficient to use OLS directly. The model I am trying to fit is like

Re: [R] Time series indexes

2005-04-27 Thread Thomas Petzoldt
Fernando Saldanha schrieb: I tried to assign values to specific elements of a time series and got in trouble. The code below should be almost self-explanatory. I wanted to assign 0 to the first element of x, but instead I assigned zero to the second element of x, which is not what I wanted. Is

Re: [R] Time series indexes

2005-04-27 Thread Gabor Grothendieck
On 4/26/05, Fernando Saldanha [EMAIL PROTECTED] wrote: I tried to assign values to specific elements of a time series and got in trouble. The code below should be almost self-explanatory. I wanted to assign 0 to the first element of x, but instead I assigned zero to the second element of x,

Re: [R] Time series indexes

2005-04-27 Thread Fernando Saldanha
Thanks, Gabor. Reading your suggestion (and a previous one as well) I realized I surely expressed myself quite badly when asking the question. Luckily one person privately suggested the following solution, which is exactly what I was looking for: x[time(x)==2] - 0 This works wonderfully.

Re: [R] Time series misalignment

2005-04-12 Thread Achim Zeileis
Fernando: This maybe a basic question, but I have spent several hours researching and I could not get an answer, so please bear with me. The problem is with time series in the package tseries. BTW: the `tseries' package is not involved here. As the example below shows, the time series can

Re: [R] Time series misalignment

2005-04-12 Thread Fernando Saldanha
Can one also predetermine a set and then estimate all the models one wants to compare using the zoo package? Or can that be done only with the tseries package? Thanks. FS On 4/12/05, Achim Zeileis [EMAIL PROTECTED] wrote: Fernando: This maybe a basic question, but I have spent several

RE: [R] Time Series

2005-03-16 Thread Robert Sams
see packages zoo and its on cran. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 16, 2005 7:17 PM To: r-help@stat.math.ethz.ch Subject: [R] Time Series Hello, I'm using a dataset with unequally spaced time series and I'd want to

Re: [R] Time Series

2005-03-16 Thread Prof Brian Ripley
On Wed, 16 Mar 2005 [EMAIL PROTECTED] wrote: I'm using a dataset with unequally spaced time series and I'd want to know if there is in R some function in order to calculate the autocorrelation function, because acf() in stats package cannot calculate it, because I have many missing data, and data

Re: [R] Time series documentation?

2005-02-20 Thread Spencer Graves
Hello, Kum-Hoe: Have you considered the strucchange package? Inspired and informed by Gabor's comments, it looks to me at the moment like this package help you fit intervention / regression fits with time series / ARMAX models with minimum hassle. hope this helps. spencer

Re: [R] Time series documentation? (was: best analysis method : for time series ans cross sectional data)

2005-02-19 Thread Gabor Grothendieck
Spencer Graves spencer.graves at pdf.com writes: : In particular, what's the preferred way to keep track of dates with : time series? I tried assigning a Date object somehow to a ts : object, so far without success. Two of my attempts are as follows: : : tst2 - ts(1:11,

Re: [R] Time series documentation?

2005-02-19 Thread Spencer Graves
Hi, Gabor: Thanks. Which package(s) do you prefer for which purposes? Best Wishes, Spencer Graves Gabor Grothendieck wrote: Spencer Graves spencer.graves at pdf.com writes: : In particular, what's the preferred way to keep track of dates with : time series? I tried

Re: [R] Time series documentation?

2005-02-19 Thread Gabor Grothendieck
Spencer Graves spencer.graves at pdf.com writes: : : Thanks. Which package(s) do you prefer for which purposes? 'ts' can be used for regularly spaced time series and supports monthly and quarterly dates. The other ones listed below supports irregular time series. zoo's design goals

Re: [R]time series - state space (was: no subject)

2004-12-06 Thread Kjetil Brinchmann Halvorsen
Rene Pineda wrote: I need information about space state models in structural model and kalman filtering. I have a univariate time serie and i nedd aplicate space state model Please use an informative subject line! See ?arima and the references therein. See also the R Newsletter, volume 2/2,

Re: [R] Time series plot orientation

2004-11-19 Thread Uwe Ligges
Costas Vorlow wrote: Hello, I am trying to rotate by 90 degrees a time series plot. So I need the time axis to be the vertical one. Is there an easy way? No, you have to do it manually, AFAIK. Uwe Ligges I couldn't guess anything from the help pages. Apologies for a silly question. Regards,

Re: [R] time series object

2004-06-16 Thread Prof Brian Ripley
window() is the normal way to do this. On Tue, 15 Jun 2004, Laura Holt wrote: Hi R People: I have a monthly time series x.ts which runs from 1/1995 through 12/2003. x.ts - ts(x,start=1995,freq=12) str(x.ts) Time-Series [1:108] from 1995 to 2004: -1.638 -0.236 0.830 -0.548 0.363 ...

RE: [R] time series object

2004-06-15 Thread Gabor Grothendieck
?window Date: Tue, 15 Jun 2004 18:43:04 -0500 From: Laura Holt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [R] time series object Hi R People: I have a monthly time series x.ts which runs from 1/1995 through 12/2003. x.ts - ts(x,start=1995,freq=12) str(x.ts) Time-Series

RE: [R] time-series

2004-03-08 Thread antonio rodriguez
Hi Eduardo, Probably a good idea is to do a multivariate analysis through spectral analysis. With function spectrum you can look for coherence and phase between several time series. In your case with different lengths, you can use the option: na.action=na.omit

Re: [R] Time series indexing/subsetting

2003-11-24 Thread Jason Turner
[EMAIL PROTECTED] wrote: R-listers: I may be asking too much from R, but is there a way to use time indexing on a time series object. For instance: tsobject - ts(1:12, start =1999, freq = 4) tsobject Qtr1 Qtr2 Qtr3 Qtr4 19991234 20005678 20019 10

RE: [R] Time Series DGPs

2003-09-25 Thread Pfaff, Bernhard
I was wondering if anyone had some sample time series dgp code. I am particularly interested in examples of autoregressive processes and error correction model DGPs. I have attached a more specific example of what I mean. I have tried myself but would hoping someone had some more

Re: [R] Time Series-like barplot?

2003-03-19 Thread Spencer Graves
The following produces thick lines like you requested: plot(c(1, 10), c(1, 5), type=n) for(j in 1:5) lines(range(which(!is.na(foo.mat[,j]))), rep(j, 2), lwd=10) If you want open bars, then draw boxes inside the loop. Is this satisfactory? Spencer Graves Andy Bunn wrote:

RE: [R] Time Series-like barplot?

2003-03-19 Thread Marc Schwartz
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Bunn Sent: Wednesday, March 19, 2003 12:15 PM To: [EMAIL PROTECTED] Subject: [R] Time Series-like barplot? I have data structured like the following: foo.mat - matrix(NA, ncol = 5, nrow = 10)

Re: [R] time series missing 0 counts

2003-02-14 Thread ripley
Yes, there is an easy way. Create the regular time series you want by something like x - ts(0, start=c(2000,52), end=c(2003,9), frequency=52) and fill in the time points you have data for by xYear - trunc(times(x)); xWeek - cycle(x) attach(mydata) x[(xYear==year) (xWeek==Week)] - Count

Re: [R] time series missing 0 counts

2003-02-14 Thread Dirk Eddelbuettel
On Fri, Feb 14, 2003 at 11:21:33AM +, [EMAIL PROTECTED] wrote: Yes, there is an easy way. Create the regular time series you want by something like x - ts(0, start=c(2000,52), end=c(2003,9), frequency=52) and fill in the time points you have data for by xYear - trunc(times(x));