Description Usage Arguments Details Value See Also

generates the different simulation scenarios. This function is
not intended to be called directly by users. See `gendata`

1 2 3 | ```
gendataPaper(n, p, corr = 0, E = truncnorm::rtruncnorm(n, a = -1, b =
1), betaE = 2, SNR = 2, hierarchy = c("strong", "weak", "none"),
nonlinear = TRUE, interactions = TRUE, causal, not_causal)
``` |

`n` |
number of observations |

`p` |
number of main effect variables (X) |

`corr` |
correlation between predictors |

`E` |
simulated environment vector of length |

`betaE` |
exposure effect size |

`SNR` |
signal to noise ratio |

`hierarchy` |
type of hierarchy. Can be one of |

`nonlinear` |
simulate non-linear terms (logical). Default: TRUE |

`interactions` |
simulate interaction (logical). Default: TRUE |

`causal` |
character vector of causal variable names |

`not_causal` |
character vector of noise variables |

Requires installation of `truncnorm`

package. Not meant to be
called directly by user. Use `gendata`

.

A list with the following elements:

- x
matrix of dimension

`nxp`

of simulated main effects- y
simulated response vector of length

`n`

- e
simulated exposure vector of length

`n`

- Y.star
linear predictor vector of length

`n`

- f1
the function

`f1`

evaluated at`x_1`

(`f1(X1)`

)- f2
the function

`f1`

evaluated at`x_1`

(`f1(X1)`

)- f3
the function

`f1`

evaluated at`x_1`

(`f1(X1)`

)- f4
the function

`f1`

evaluated at`x_1`

(`f1(X1)`

)- betaE
the value for

*β_E*- f1.f
the function

`f1`

- f2.f
the function

`f2`

- f3.f
the function

`f3`

- f4.f
the function

`f4`

- X1
an

`n`

length vector of the first predictor- X2
an

`n`

length vector of the second predictor- X3
an

`n`

length vector of the third predictor- X4
an

`n`

length vector of the fourth predictor- scenario
a character representing the simulation scenario identifier as described in Bhatnagar et al. (2018+)

- causal
character vector of causal variable names

- not_causal
character vector of noise variables

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.