Re: [R] help! - spectral analysis - spec.pgram
series -c(0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10 ,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10) Here ain this example after period 4 the pattern repeats. So we can say that the above series have a period of 4. Now my question is by using the function spec.pgram(series, log=no) we will get a graph of power vs frequency. Correct me if I am wrong. Now from this graph I want to determine the period of seasonality. How should I determine it?? -- View this message in context: http://r.789695.n4.nabble.com/help-spectral-analysis-spec-pgram-tp851439p2216079.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] help! - spectral analysis - spec.pgram
On 14.05.2010 06:03, vikrant wrote: series-c(0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10 ,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10) Here ain this example after period 4 the pattern repeats. So we can say that the above series have a period of 4. Now my question is by using the function spec.pgram(series, log=no) we will get a graph of power vs frequency. Correct me if I am wrong. Now from this graph I want to determine the period of seasonality. How should I determine it?? You find that the first highest peak is at freq 0.167 hence 1/0.167 = 6 is your period (not 4). But as I said before, you need to read a textbook about Fourier analysis / the spectrum... Uwe Ligges __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] help! - spectral analysis - spec.pgram
Really Thanks Uwe . I have started reading books about Fourier analysis. -- View this message in context: http://r.789695.n4.nabble.com/help-spectral-analysis-spec-pgram-tp851439p2216443.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] help! - spectral analysis - spec.pgram
On 12.05.2010 07:48, vikrant wrote: Dear Prof Brian, This is a mailinglist, and I do not know any Prof. Brian so far (or maybe I should expect to be called Prof. Uwe ?). I am new to spectral analysis. I dont know how to obtain period from spectral periodogram. Then you should really start to read textbooks about spectral analysis rather than asking a mailing list (or Prof. Brian unless he is your supervisor). If u could explain me about how to obtain the period from periodogram it will be very helpful. U can explain using the above two examples in the discussiion. Which examples?? Thanks in advance.. Uwe Ligges __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] help! - spectral analysis - spec.pgram
Dear Prof Brian, I am new to spectral analysis. I dont know how to obtain period from spectral periodogram. If u could explain me about how to obtain the period from periodogram it will be very helpful. U can explain using the above two examples in the discussiion. Thanks in advance.. -- View this message in context: http://r.789695.n4.nabble.com/help-spectral-analysis-spec-pgram-tp851439p2195624.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] help! - spectral analysis - spec.pgram
Can someone explain me this spec.pgram effect? Code: period.6-c(0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10 ,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10) period.5-c(0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,0,0,10 ,0,0,0,0,10,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,0,0,10,0,0,0,0,10,0) par(mfrow=c(2,1)) spec.pgram(period.6, log=no) spec.pgram(period.5, log=no) The first series has period 6 and shows its periodicity in 1/6 and harmonics. In the second series I was expecting to see a signal occurring at frequency 1/5 but it does not. Can anybody explain me why? Thanks in advance, Nuno __ Centro de Oceanografia - IO-FCUL, Portugal Center for Quantitative Fisheries Ecology - ODU, USA email: [EMAIL PROTECTED] ; [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] help! - spectral analysis - spec.pgram
On Thu, 27 Mar 2008, Nuno Prista wrote: Can someone explain me this spec.pgram effect? Code: period.6-c(0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10 ,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10) period.5-c(0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,0,0,10 ,0,0,0,0,10,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,0,0,10,0,0,0,0,10,0) par(mfrow=c(2,1)) spec.pgram(period.6, log=no) spec.pgram(period.5, log=no) The first series has period 6 and shows its periodicity in 1/6 and harmonics. In the second series I was expecting to see a signal occurring at frequency 1/5 but it does not. Can anybody explain me why? Because it does not have period 5 but 12 With such short series tapering has some effect. Try x - rep(c(0,0,0,0,0,10,0,0,0,0,10,0), 100) spec.pgram(x, log=no) Thanks in advance, Nuno __ Centro de Oceanografia - IO-FCUL, Portugal Center for Quantitative Fisheries Ecology - ODU, USA email: [EMAIL PROTECTED] ; [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.