Description Usage Arguments Details Value Examples
Creates a dataset with specified intercept and coefficient. Outputs a continuous outcome Y1
and a binary outcome Y2
.
1 | generateData(N, alpha, beta, var, seed = 1234)
|
N |
Number of rows desired in the output dataset |
alpha |
Intercept |
beta |
Coefficient value for relationship between X and Y |
var |
Variance of Y1 |
seed |
Random seed |
Generates data as follows:
X \sim N(0, √{7})
Y1 = α + β X + N(0, √{σ^2_y})
Y2 = \frac{exp(α + β X)}{exp(α + β X) + 1}
data.frame(Y1, Y2, X) |
1 | generateData(N = 10000, alpha = 10, beta = 0.8, var = 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.