sim_single_stage_multi_actions | R Documentation |
Simulate Single-Stage Multi-Action Data
sim_single_stage_multi_actions(n = 1000, seed = NULL)
n |
Number of observations. |
seed |
Integer. |
sim_single_stage_multi_actions
samples n
iid observation
O = (z, x, a, u)
with the following distribution:
z, x \sim Uniform([0,1])\\
\tilde a \sim \mathcal{N}(0,1)\\
a \mid \tilde a \sim
\begin{cases}
0 \quad if \quad \tilde a < -1\\
1 \quad if \quad \tilde a -1 \leq a < 0.5\\
2 \quad otherwise
\end{cases}\\
u \mid z, x \sim \mathcal{N}(x + z + I\{a=2\}(x-0.5) + I\{a=1\}(x^2 + z -0.5), 1)
data.frame with n rows and columns z, x, a, and u.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.