simGausFromDAG {causalDisco} | R Documentation |
Simulate Gaussian data according to DAG
Description
Simulates a jointly Gaussian dataset given a DAG adjacency matrix. The data is simulated using linear structural equations and the parameters (residual standard deviations and regression coefficients) are sampled from chosen intervals.
Usage
simGausFromDAG(
amat,
n,
regparLim = c(0.5, 2),
resSDLim = c(0.1, 1),
pnegRegpar = 0.4,
standardize = FALSE
)
Arguments
amat |
An adjacency matrix. |
n |
The number of observations that should be simulated. |
regparLim |
The interval from which regression parameters are sampled. |
resSDLim |
The interval from which residual standard deviations are sampled. |
pnegRegpar |
The probability of sampling a negative regression parameter. |
standardize |
If |
Details
A variable is simulated as
where are the parents of
in the DAG.
The residual,
, is drawn from a normal distribution.
Value
A data.frame of identically distributed simulated observations.