acy_sim | R Documentation |
Generates samples from an ACY process. ACY refers to the paradigm where there
are multiple dicotomous variables and a causal DAG. In acy_sim
, the DAG is implemented
by formulas, with the response variable on the left and the value to be calculated.
on the right.
acy_sim(story = NULL, ..., samp_n = 5, numerical = "Y")
story |
Optional list containing formulas and/or label names |
... |
more formulas describing the process and/or label names |
samp_n |
Integer giving the number of rows in the output |
numerical |
List of (quoted) variable names for which to append a numerical output, which will be the underlying log odds for the discrete version of that variable. |
The calculated values are log odds. In the output, these will be converted to 0,1 dicotomous variables. Exogenous variables should be set to a constant log odds. (0 will give an equal prob of a 1/0 outcome.) Endogenous variables should be a mathematical function of the exogenous and (sometimes) other endogenous variables.
A label name can be an element of ...
or story
. This label will be used to denote
the observed value if the underlying variable is 1. (o
or 0 is used otherwise.)
acy_sim(x ~ 0, y ~ x, samp_n = 20, numerical = "y") acy_sim(X ~ 0, Y ~ 10* X - 1, Z ~ - 3 + 10 * Y, X = 1, Y = "murder", Z = "telegraph", samp_n = 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.