>  Docs Center  >  Libraries  >  Daithi  >  MONTE_CARLO_AR1
Libraries

MONTE_CARLO_AR1

MONTE_CARLO_AR1

Name


MONTE_CARLO_AR1

Purpose


This function returns a Monte Carlo generated time series which
preserves the distributional and AR(1) properties of the original
series.

Category


Time Series Analysis

Calling Sequence


Result = MONTE_CARLO_AR1( X )

Inputs


X: An array of any numerical type.

Keyword Parameters


REPLACE: If set, the function shuffles with replacement. The default
is without replacement.
SEED: A seed for the random number generator to use.

Outputs


Result: Returns a Monte Carlo generated vector inspired by X.

Uses


SHUFFLE.pro

Procedure


This function generates an AR(1) vector with the random component
generated by shuffling the elements of the input vector.

Example


Define an AR(1) vector with coefficient 0.9, length 1000, and unit
standard deviation noise.
        x = fltarr( 1000 )
        for i = 1, 999 do x[i] = 0.9 * x[i-1] + randomn( seed, 1 )
Generate an time series that maintains the distribution and AR(1)
properties of x.
result = monte_carlo_ar1( x, replace=1 )

Modification History


  Written by: Daithi A. Stone (stoned@atm.ox.ac.uk), 2003-11-19.
Modified: DAS, 2005-10-23 (added SEED keyword)



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us