Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- Generate Autocorrelated Random Variable

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Generate Autocorrelated Random Variable

Nov 4, 2009 12:03 PM
(1189 views)

Is there an easy way in JMP® to create an autocorrelated random variable with a specified (first lag) autocorrelation?

2 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Generate Autocorrelated Random Variable

I guess it depends on your definition of "easy". Alot of work goes into generating random number generators that don't exhibit any auto-correlation. You want the opposite, so is unlikely to be available as a simple callable function.

But you could do it in JSL. The technique for generated random numbers for 2 correlated variables involves the use of matrices and Cholesky decomposition, both of which are supported in JSL. I think the trick would be to take the first variable as your time series, then the second variable as your time series offset by the lag that you want exhibited in the autocorrelated data.

But you could do it in JSL. The technique for generated random numbers for 2 correlated variables involves the use of matrices and Cholesky decomposition, both of which are supported in JSL. I think the trick would be to take the first variable as your time series, then the second variable as your time series offset by the lag that you want exhibited in the autocorrelated data.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Generate Autocorrelated Random Variable

I've been thinking about the method that I suggested. I haven't tried it but I don't think it would work. Depending on why/how you want to generate the autocorrelated sequence, you could try something like this. Generate 2 colulmns, the first a set of random uniforms, and the second derived from the lag offset that you are looking for:

Column 1 = Random Uniform(I)

Column 2 = Column 1 + Lag( Column 1, 1)

You can then fiddle (technical term!) with the formula for column 2 so that it exhibits the properties that you are looking for (e.g. change the weightings of the first or second term).

Column 1 = Random Uniform(I)

Column 2 = Column 1 + Lag( Column 1, 1)

You can then fiddle (technical term!) with the formula for column 2 so that it exhibits the properties that you are looking for (e.g. change the weightings of the first or second term).