Re: [R] ACF values with confidence limits + Plot Extaction

2016-03-06 Thread Jean-Claude Arbaut
a <- as.ts(rnorm(20)) png("acf.png") a.acf <- acf(a) dev.off() # to see what is available names(a.acf) unclass(a.acf) 2016-03-06 20:06 GMT+01:00 Preetam Pal : > Thanks, Michael. Appreciate it. > But suppose I go for the plot, how to extract it from R ... say, I want to > save it as a .png file.

Re: [R] ACF values with confidence limits + Plot Extaction

2016-03-06 Thread Bert Gunter
My word! Did you try ?png? More to the point, any good R tutorial should provide such info. Pls make some reasonable efforts on your own before posting here. Cheers, Bert On Sunday, March 6, 2016, Preetam Pal wrote: > Thanks, Michael. Appreciate it. > But suppose I go for the plot, how t

Re: [R] ACF values with confidence limits + Plot Extaction

2016-03-06 Thread Preetam Pal
Thank you very much,Jean-Claude and Michael. 1> @Michael, your suggestion "plot = FALSE" only returns the estimated ACF values, not the confidence limits at different lags. May be I am missing something here.Do you know any way around for this? 2>@Jean-Claude, got it, thanks. Regards, Preetam On

Re: [R] ACF values with confidence limits + Plot Extaction

2016-03-06 Thread Preetam Pal
Thanks, Michael. Appreciate it. But suppose I go for the plot, how to extract it from R ... say, I want to save it as a .png file. Regards, Preetam On Sun, Mar 6, 2016 at 3:39 PM, Michael Dewey wrote: > According to the documentation acf returns what you want. It also says > that it returns it i

Re: [R] ACF values with confidence limits + Plot Extaction

2016-03-06 Thread Michael Dewey
According to the documentation acf returns what you want. It also says that it returns it invisibly if plot = TRUE which I imagine is what you are doing. So try res <- acf(insert_parameters_here, plot = FALSE) and then look at res On 06/03/2016 07:40, Preetam Pal wrote: Hi R-users, I have

Re: [R] acf(ts.union()): Missing Values in Object

2014-03-27 Thread Rich Shepard
On Thu, 27 Mar 2014, Rich Shepard wrote: s95ec.z <- read.zoo("s95ec.dat", sep = ".", format = "%Y-%m-%d" ^ ) didn't copy but was present on the command line. Tryi

Re: [R] acf(ts.union()): Missing Values in Object

2014-03-27 Thread Rich Shepard
On Thu, 27 Mar 2014, Rich Shepard wrote: I'll report back on whether that avoids the errors. Changing from ts.union() to ts.intersect() did not make a difference. So, I went back to bare metal by using awk to generate two-column text files, each consisting of a date and an interger or real v

Re: [R] acf(ts.union()): Missing Values in Object

2014-03-27 Thread Rich Shepard
On Thu, 27 Mar 2014, William Dunlap wrote: Why aren't you using ts.intersect instead of ts.union? Bill, I was wondering the same thing. The reason (perhaps excuse would be the more appropriate term) is my emulating the example in Paul Cowpertwait and Andrew Metcalfe's "Introductory Time Ser

Re: [R] acf(ts.union()): Missing Values in Object

2014-03-27 Thread William Dunlap
45 AM > To: r-help@r-project.org > Subject: Re: [R] acf(ts.union()): Missing Values in Object > > On Wed, 26 Mar 2014, Rich Shepard wrote: > > > According to the ts.union help, "‘ts.union’ pads with ‘NA’s to the total > > time coverage" but the problem seems to be

Re: [R] acf(ts.union()): Missing Values in Object

2014-03-27 Thread Rich Shepard
On Wed, 26 Mar 2014, Rich Shepard wrote: According to the ts.union help, "‘ts.union’ pads with ‘NA’s to the total time coverage" but the problem seems to be that one series has a single NA while the other has 2 NAs. Both series have 792 rows of (date, value). I should have written in the fi

Re: [R] acf and ccf

2013-07-30 Thread arun
s, snames = colnames(x)), class = "acf") Check this link: http://stackoverflow.com/questions/14035506/how-to-see-the-source-code-of-r-internal-or-primitive-function A.K. From: Cathy Lee Gierke To: arun Sent: Tuesday, July 30, 2013 5:04 PM Subject:

Re: [R] acf and ccf

2013-07-30 Thread arun
Just type acf ccf on R prompt A.K. - Original Message - From: Cathy Lee Gierke To: r-help@r-project.org; r-core-ow...@r-project.org Cc: Sent: Tuesday, July 30, 2013 4:02 PM Subject: [R] acf and ccf Greetings, Is it possible to see the source code for the acf and ccf functions?  I

Re: [R] acf question...

2013-07-02 Thread Rolf Turner
On 03/07/13 04:21, Venkatesh Nagarajan wrote: > I am trying to understand lagged correlations. > > x= 1:100; > y = c(rep(NA,40), 1:60)ccf(x = x, y = y, lag.max=100, na.action=na.pass, type > = "correlation") > > I was hoping to see max cor at lag = 40. But I am not. What am I doing wrong? We

Re: [R] acf question...

2013-07-02 Thread Jeff Newmiller
Then you are posting in the wrong forum, since this is a forum about getting R to do things for which you already understand the theory. As to the results you are getting, I highly recommend reading the details section of ?ccf. BTW The Posting Guide indicates that you should post in text format

Re: [R] acf () and pacf()

2012-12-30 Thread Prof Brian Ripley
On 30/12/2012 07:47, Rashid Ameer wrote: I have used acf() and pacf() in R to get the acf and pacf values at max/lag=20 but the output did not show the values associated with lag numbers. lag numbers is shown in decimals. What 'lag numbers'? Lags in time series are in time units: most likely y

Re: [R] acf() plot of matrix cuts y-axis labels

2012-03-02 Thread Folkes, Michael
-project.org Subject: Re: [R] acf() plot of matrix cuts y-axis labels On 02/03/2012 11:40 AM, Folkes, Michael wrote: > Hello all, > I found a funny problem with y-axis labels when plotting acf(matrix) - > the labels are too close to one of the margins and cut in half. > Here's the

Re: [R] acf() plot of matrix cuts y-axis labels

2012-03-02 Thread Duncan Murdoch
On 02/03/2012 11:40 AM, Folkes, Michael wrote: Hello all, I found a funny problem with y-axis labels when plotting acf(matrix) - the labels are too close to one of the margins and cut in half. Here's the problem: test<-matrix(rnorm(200),ncol=4) acf(test) This doesn't fix the problem: test<-matr

Re: [R] acf?

2011-11-04 Thread Gabor Grothendieck
On Sat, Nov 5, 2011 at 12:26 AM, Kevin Burton wrote: > I started to check what I thought I knew with autocovariance and it doesn’t > jive with the the calculations given by ‘R’. I was wondering if there is > some scaling or something that I am not aware of. > > > > Take the example > > > > Ø  d <-

Re: [R] Acf of Frima

2011-02-02 Thread Spencer Graves
What's farima? functional arima or fractional arima? If the former, the "fda" package includes a function "cor.fd" for "correlation matrix from functional data object(s)". If the latter, I suggest you use sos as follows: library(sos) (fr <- findFn('fractional arima')) "findFn" sear

Re: [R] acf function

2010-09-26 Thread Theresa Csar
Hi Andre, try acf.data$acf regards, Theresa andre bedon wrote: Hi, Im new to R so this question is quite fundamental. Im trying to compare some autocorrelations generated by the acf function to some theoretical correlations. How can I have acces to just the autocorrelations, for comput

Re: [R] acf

2010-07-06 Thread Joris Meys
Your question is a bit confusing. "acfresidfit" is an object, of which we don't know the origin. with your test file, I arrive at the first correlations (but with integer headings) : > residfit <- read.table("fileree2_test_out.txt") > acf(residfit) > acfresid <- acf(residfit) > acfresid Autocorre

Re: [R] ACF and PACF

2010-02-11 Thread Uwe Ligges
On 11.02.2010 12:48, sathiya_mtm wrote: Hi helpers, can you help me in plotting acf and pacf functions in R. I am using the code acf(variable name) > but it is not working. For me it is, hence citing the footer of al R-help messages: PLEASE do read the posting guide http://www.R-project

Re: [R] ACF normalization and Nesed For loops

2009-12-22 Thread alok juneja
Thanks for the suggestions.. I must admit that on the R-help one of my coworker is asking the same question named "Nested For loops". My question "ACF normalization" and his question both lead to the same problem. So now I merge both the questions. Sorry for the inconvenience. The main problem

Re: [R] ACF normalization and Nesed For loops

2009-12-22 Thread alok juneja
ch one. As when I used ACF, I simply used it like acf(distance,lag.max=l0,plot=FALSE) but I am not sure by default generic ACF is using either ACF.gls or ACF.lme Please guide so that I can kick start. Best Alok & Baloo --- On Tue, 12/22/09, ONKELINX, Thierry wrote: > From: ONKELINX, T

Re: [R] ACF normalization.

2009-12-22 Thread ONKELINX, Thierry
: R help Onderwerp: Re: [R] ACF normalization. May be please inform where I can find the source code for "nlme:::ACF.gls" and "nlme:::ACF.lme". Sorry to ask. As I have looked into the R directory but don't find that. Best Alok --- On Tue, 12/22/09, Prof Brian Ripley

Re: [R] ACF normalization.

2009-12-22 Thread alok juneja
May be please inform where I can find the source code for "nlme:::ACF.gls" and "nlme:::ACF.lme". Sorry to ask. As I have looked into the R directory but don't find that. Best Alok --- On Tue, 12/22/09, Prof Brian Ripley wrote: > From: Prof Brian Ripley > Sub

Re: [R] ACF normalization.

2009-12-22 Thread Prof Brian Ripley
On Tue, 22 Dec 2009, alok juneja wrote: Hi, My earlier email was sent as html so no visible properly. I am now posting it as text. Sorry for the duplication of the message. Can anyone please provide the formula used to compute ACF(nlme). I believe the one that is used in R is of the type me

Re: [R] ACF normalization.

2009-12-22 Thread alok juneja
Hi, My earlier email was sent as html so no visible properly. I am now posting it as text. Sorry for the duplication of the message. Can anyone please provide the formula used to compute ACF(nlme). I believe the one that is used in R is of the type mentioned on the website (http://www.itl.nis

Re: [R] acf for a univariate time series in a data frame

2009-10-08 Thread CJ Rubio
*additional: the lags i am expecting is in months.. since i am trying to predict monthly streamflow. thanks again -- View this message in context: http://www.nabble.com/acf-for-a-univariate-time-series-in-a-data-frame-tp25799751p25799784.html Sent from the R help mailing list archive at Nabble.

Re: [R] acf gives correlations > 1

2009-09-14 Thread Ted Harding
This is quite a nasty one! I've been having a look at it, and I think it would be useful to go back to first principles. Given a series u[1:N], the correlation coefficient between u[1:(N-k)] and u[(k+1):N] is c(k) = cov(u[1:(N-k)],u[(k+1):N])/sqrt(var(u[1:(N-k)])*var(u(k+1):N])) in which, in par

Re: [R] acf gives correlations > 1

2009-09-14 Thread Liviu Andronic
Hello On Mon, Sep 14, 2009 at 2:53 PM, Steve Jones wrote: > Looks like I'll have to compute the acf myself. Shame, but such is life. > Wouldn't na.omit be an option? Liviu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-hel

Re: [R] acf gives correlations > 1

2009-09-14 Thread Steve Jones
I misunderstood what the help page was saying - I thought that the missing values were what constituted the invalid function. Clearly I was mistaken. Looks like I'll have to compute the acf myself. Shame, but such is life. Thanks for the input, everyone! Steve. Berwin A Turlach wrote: > G'day S

Re: [R] acf gives correlations > 1

2009-09-14 Thread Duncan Murdoch
On 14/09/2009 7:44 AM, Steve Jones wrote: Apologies for the missing data. It can be downloaded from here (22Kb): http://www.squaregoldfish.co.uk/sekrett/series.csv The dataset is 97% missing values. I suspect what you're seeing is what the man page describes as follows: "If the na.action fu

Re: [R] acf gives correlations > 1

2009-09-14 Thread Berwin A Turlach
G'day Steve, On Mon, 14 Sep 2009 13:44:56 +0200 Steve Jones wrote: > Apologies for the missing data. It can be downloaded from here (22Kb): > http://www.squaregoldfish.co.uk/sekrett/series.csv Well, the Details section of acf's help page states: By default, no missing values are allowed.

Re: [R] acf gives correlations > 1

2009-09-14 Thread Steve Jones
Apologies for the missing data. It can be downloaded from here (22Kb): http://www.squaregoldfish.co.uk/sekrett/series.csv Steve. Duncan Murdoch wrote: > On 14/09/2009 6:40 AM, Steve Jones wrote: >> Hi list, >> >> I've been producing autocorrelation functions of time series using the >> acf functi

Re: [R] acf gives correlations > 1

2009-09-14 Thread Duncan Murdoch
On 14/09/2009 6:40 AM, Steve Jones wrote: Hi list, I've been producing autocorrelation functions of time series using the acf function, and have found a series or two for which correlations of > 1 are given, which I think shouldn't happen. Attached is the time series I'm using, and below is the

Re: [R] acf Significance

2009-08-07 Thread Steve Jones
Your suggestion wasn't entirely useless - I didn't know about it before, so I learned something! I've had a look in the plot.acf source and found the bit I need, so it's all good now. Thanks for the suggestions. Steve. markle...@verizon.net wrote: > Hi Steve: Clearly my str suggestions was usel

Re: [R] acf Significance

2009-08-06 Thread David Scott
Steve Jones wrote: Thanks for the pointer to the str function - very handy! The output for the acf object is below - it doesn't seem to contain anything that might tell me the significance level. List of 6 $ acf : num [1:27, 1, 1] 1 0.6309 0.2989 0.0612 -0.2105 ... $ type : chr "correlatio

Re: [R] acf Significance

2009-08-06 Thread Steve Jones
Thanks for the pointer to the str function - very handy! The output for the acf object is below - it doesn't seem to contain anything that might tell me the significance level. List of 6 $ acf : num [1:27, 1, 1] 1 0.6309 0.2989 0.0612 -0.2105 ... $ type : chr "correlation" $ n.used: int 27

Re: [R] acf(): meaning of the blue horizontal lines

2008-10-28 Thread Oliver Bandel
Zitat von David Scott <[EMAIL PROTECTED]>: > On Tue, 28 Oct 2008, Oliver Bandel wrote: > > > Zitat von David Scott <[EMAIL PROTECTED]>: > > > >> On Tue, 28 Oct 2008, Oliver Bandel wrote: > >> > >>> Hello, > >>> > >>> what are they meaning? It could be something that > >>> would show a threshhold a

Re: [R] acf(): meaning of the blue horizontal lines

2008-10-28 Thread David Scott
On Tue, 28 Oct 2008, Oliver Bandel wrote: Zitat von David Scott <[EMAIL PROTECTED]>: On Tue, 28 Oct 2008, Oliver Bandel wrote: Hello, what are they meaning? It could be something that would show a threshhold above which the result is indicating different meanings then just random noise. But

Re: [R] acf(): meaning of the blue horizontal lines

2008-10-28 Thread Oliver Bandel
Zitat von David Scott <[EMAIL PROTECTED]>: > On Tue, 28 Oct 2008, Oliver Bandel wrote: > > > Hello, > > > > what are they meaning? It could be something that > > would show a threshhold above which the result is > > indicating different meanings then just random noise. > > But there is no descript

Re: [R] acf() plots of a data.frame: what meaning?

2008-10-28 Thread David Scott
On Tue, 28 Oct 2008, Oliver Bandel wrote: Hello, what is the meaning of the plots of an acf()-plot, when using a data frame as argument? The result is NOT obvious for me. There are combinations of the columns of a dataframe in the reulting plot. But an acf() is just defined for onyl one time-

Re: [R] acf(): meaning of the blue horizontal lines

2008-10-28 Thread David Scott
On Tue, 28 Oct 2008, Oliver Bandel wrote: Hello, what are they meaning? It could be something that would show a threshhold above which the result is indicating different meanings then just random noise. But there is no description on the definition of those lines, so it means nothing, if it is

Re: [R] acf function

2008-05-08 Thread Christofer
It should be ok -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Irene Mantzouni Sent: Thursday, May 08, 2008 5:45 PM To: [EMAIL PROTECTED] Subject: [R] acf function Dear all, I have an annual time-series of population numbers and I would like to esti

Re: [R] acf lag1 value

2008-01-17 Thread Shubha Vishwanath Karanth
2:27 PM To: Shubha Vishwanath Karanth Cc: [EMAIL PROTECTED] Subject: Re: [R] acf lag1 value Please re-check your time-series books. The acf at lag 1 is _not_ the correlation between x and lag(x). For one thing, the variance of x is computed from the whole series, and not from the series with

Re: [R] acf lag1 value

2008-01-17 Thread Prof Brian Ripley
Please re-check your time-series books. The acf at lag 1 is _not_ the correlation between x and lag(x). For one thing, the variance of x is computed from the whole series, and not from the series with either the first or last value removed -- there is also the question of the divisor. See MAS