Simulation Master Tutorials > Entering Copulas in a Model > Copula Direction

## Simulation Master Copulas

Simulation Master allows for the use of bivariate copulas in a model. This is accomplished with the RCOPULA( ) function. The copula function returns a sample from one of the uniform marginals of a bivariate copula. These samples are used as inputs to a random variable instead of generating a random number for sampling. The copula dictates correlation between two variables by generating two outputs with the desired correlation structure.

RCOPULA( ) has two modes of operation: variable 1 and variable 2. The mode of operation is specified as a parameter. A copula in Simulation Master requires four cells that contain functions. Two are the RCOPULA( ) functions for variable 1 and 2. The other two contain the RANDNUM( ) function to generate random numbers that are used as inputs to the copula functions.

An example copula is shown below.

## The Copula Tool

The copula tool aids in the addition of copulas to a model. A copula can be constructed by typing the functions in cells with the required parameters, but the copula tool walks you through the process and minimizes the potential for error. We will cover the use of the copula tool next.

Click the* Copula* button on the ribbon.

The *Copula* form will appear.

### Copula Type

Select the copula type from the drop-down box. For the example shown earlier, we would select "Clayton 1". The number at the end of each copula refers to correlation direction. For more on correlation direction, refer to this page. When a copula is selected, an example scatter plot of variable 1 vs. variable 2 will appear to aid you in understanding the direction.

Each copula has a alpha parameter that controls the shape of the correlation structure. Depending on the copula, some values of alpha are not allowed and the software will prevent you from entering invalid alphas. For our example we would enter 5. You can also use a cell address that contains the alpha value by using the minimize button next to the alpha box and selecting the cell.

### Variable Cells

Enter the cell address of variable 1 and variable 2. You can also select the cells in the worksheet by clicking the minimize button next to each box. These cells are where the copula functions will be placed. In our example variable 1 will be in cell E4 and variable 2 in cell E5.

### Random Number Cells

Enter the cell address of random number 1 and random number 2. You can also select the cells in the worksheet by clicking the minimize button next to each box. These cells are where the RANDNUM( ) functions will be placed. In our example random number 1 will be in cell F4 and random number 2 will be in F5.

The form will now look like this:

Once everything is entered, click the *Add Copula* button to place the functions in the worksheet. The copula should be ready to use.