|
  
correlate
Format: correlate( rand, index )
Arguments: (real) rand Call to one of the random
number generators
(int) index The random input's location in the
correlation matrix
Returns: (real) Random number with the distribution of rand
but correlated with other random inputs
Description: To use the correlate primitive,
your model must contain a Data Table sheet named Cormat
(character case is important). This table contains a row and
column for each random input that will be correlated with other
inputs. The intersection of each row and column must contain the
correlation coefficient for the corresponding pair of inputs. For
example, in the table below the correlation between Bonds and
Large Cap is 0.60.
The argument rand is any statement you would use to
generate a random number without correlation and index
indicates the row/column that contains the specific random
input's correlation data.
Examples: Definitions for uncorrelated random inputs
could look like this:
Cash:=lrand(1.01,0.01)
Bonds:=lrand(1.02,0.04)
Large Cap:=lrand(1.05,0.08)
Small Cap:=lrand(1.06,0.11)
International:=lrand(1.08,0.17)
With correlation, the same nodes look like this:
Cash=correlate(lrand(1.01,0.01),1)
Bonds:=correlate(lrand(1.02,0.04),2)
Large Cap:=correlate(lrand(1.05,0.08),3)
Small Cap:=correlate(lrand(1.06,0.11),4)
International:=correlate(lrand(1.08,0.17),5)
See Also: rand, drand, trand, nrand, lrand, brand, prand, grand, betarand, crand, setrand
|