Simulating a time series with a given spectrum
On Thu, May 28, 2015 at 12:54 AM, Roy Mendelssohn - NOAA Federal
<roy.mendelssohn at noaa.gov> wrote:
Hi All: Is there a routine in R that allows me to simulate a time series that has a given spectrum? I have looked at the R Time Series Task view, and have done a web search also, including an article to appear in the handbook of statistics on time series in R, but I don?t see anything offhand. There are some that will simulate state-space models or for given covariances matrices, but for a variety of reasons I would prefer simulating series with a given spectrum.
Not sure it will totally answer your question, but if you are interested in simulating random time series having the same power spectrum but random phases as an input time series, you can visit this website (http://iri.columbia.edu/~vincent/matlab_function_version1/function_matlab.htm). There is a Matlab function called "ebisuzaki" (http://iri.columbia.edu/~vincent/matlab_function_version1/ebisuzaki.htm), which performs this. Of course, this implies you already have a time series of known spectrum. This function can easily be rewritten in R.
Thanks for any help. -Roy ********************** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ********************** Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center ***Note new address and phone*** 110 Shaffer Road Santa Cruz, CA 95060 Phone: (831)-420-3666 Fax: (831) 420-3980 e-mail: Roy.Mendelssohn at noaa.gov www: http://www.pfeg.noaa.gov/ "Old age and treachery will overcome youth and skill." "From those who have been given much, much will be expected" "the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
Pascal Oettli Project Scientist JAMSTEC Yokohama, Japan