My goal is to do simulation to measure the performance of PC-algorithm. For example, I need to measure the performance of PC-algorithm in the DAG which has 10 nodes and 10 edges.

I can generate such a DAG.

```
library(pcalg)
dag <- randDAG(10, 1, "er") # 1 means the the expected number of neighbours per node, thus 10/10=1
```

Then the above dag is my true underlying model. I need to simulate some observed data from this true dag. Assume the data X follows joint Gaussian and X_1, X_2,..., X_10 are independent. So we can interpret the adjacency matrix as linear structure equation modeling. I don't know whether my idea is correct.

But my final goal is to measure the performance of PC-algorithm in the DAG which has 10 nodes and 10 edges. I can do 100 runs and get the average structure hamming distances (shd).