Trying to create autocorrelated random series
1 view (last 30 days)
Show older comments
I have a normalized autocorrelation function C(t) = exp(-t/tau), where tau is a constant. I also have a function, f(n_samples), for generating an array of random uncorrelated data with the desired distribution. How do I create a time series with sample interval, dt, that is autocorrelated given C(t), and the random distribution?
Thanks,
Patrick
0 Comments
Answers (1)
Shashank Prasanna
on 20 Jan 2013
Edited: Shashank Prasanna
on 20 Jan 2013
I would start with creating an AR model whose error terms come from your f(n_samples) function. Estimate the model to create data and plot the auto-correlation function (autocorr function in the econ toolbox, or write your own/ find in file central submission).
I would set this up as an optimization problem where we would minimizes the error between the ACF and C(t) for the parameters for the AR model. I am not sure if there is a function that does what you ask automatically, but this should work.
2 Comments
Shashank Prasanna
on 21 Jan 2013
The AR (Autoregressive) model I mentioned is a digital filter, think of it as an IIR filter. The summary of what I said above is that you have to find the coefficients of this filter, such that it will produce correlated signal, defined by C(t). But how do we find these coefficients? That is the question I tried to answer by optimization. I am unsure if there is a quicker or an established way though.
See Also
Categories
Find more on Statistics and Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!