CAUSALDISCOVERY Procedure
SIMULATE Statement
SIMULATE <OUT=libref.data-table> <OUTDATA=libref.data-table> </ options>;
The SIMULATE statement specifies the options to be used to first simulate a DAG and then generate the observations from the simulated DAG. You can specify the following options:
-
OUT=libref.data-table
OUTDAG=libref.data-table writes the simulated DAG to the specified output data table. You must specify this option if you also specify the EVALUATE statement; this table is then used as the TRUEDAG= input table in the EVALUATE statement. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.
- OUTDATA=libref.data-table
writes the simulated data to the specified output data table. You must specify this option if you also specify the LEARN statement; this table is then used as the DATA= input table in the LEARN statement. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.
You can also specify the following options after a slash (/):
-
NEDGES=number
E=number specifies the number of edges in the DAG. The number must be a nonnegative integer. By default, NEDGES=min
, where d is the number of nodes or variables.
-
NOBS=number
N=number
SAMPLESIZE=number specifies the number of observations in the OUTDATA= option table. The number must be a positive integer. By default, NOBS=10000.
- NOISE(DIST=distribution)
-
specifies how the noise terms in the structural causal model are generated. You can specify the following distribution:
-
GAUSSIAN(gaussian-options)
NORMAL(gaussian-options) -
specifies the Gaussian distribution for the noise. You can specify the following gaussian-options:
- MEAN=number
specifies the mean for the distribution. By default, MEAN=0.
- STD=number
specifies the standard deviation for the distribution. By default, STD=1.
- VAR=number
specifies the variance for the distribution. By default, VAR=1.
Note: You can specify the STD= option or the VAR= option, but not both.
-
GAUSSIAN(gaussian-options)
- OUTORDER=libref.data-table
writes the topological order of the simulated DAG to the specified output data table. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.
- OUTPARM=libref.data-table
writes the parameter values to the specified output data table. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.
- PARM(DIST=distribution)
-
specifies how to generate the parameter values that represent the weights of the edges. You can specify the following distribution:
- UNIFORM(uniform-options)
-
specifies the uniform distribution for the parameter values. You can specify the following uniform-options:
- LB=number
specifies the lower bound of the distribution. By default, LB=–1.
- EXCLLB=number
specifies the lower bound of the excluded range. By default, EXCLLB=–0.5.
- EXCLUB=number
specifies the upper bound of the excluded range. By default, EXCLUB=0.5.
- UB=number
specifies the upper bound of the distribution. By default, UB=1.
The range of the uniform distribution is (LB, EXCLLB] U [EXCLUB, UB). The middle (EXCLLB, EXCLUB) range is excluded to avoid numerical unstability in the simulated data set, as is common practice in the DAG literature.
- SEED=number
specifies the random number seed value for the random number generator. If the seed value is 0, a random number stream is generated by using the time of day from the computer’s clock. Seed values greater than 0 generate reproducible random number sequences. By default, SEED=1.