View source: R/dgenSimpleLinear.R
dgenSimpleLinear | R Documentation |
Data generating process for a simple linear regression
dgenSimpleLinear(num.obs = 50, intercept = 2, treatment.effect = -4, seed = 1)
num.obs |
the number of observations to generate in the data set; defaults to 50 observations |
intercept |
the y-intercept of the linear model; defaults to 2 |
treatment.effect |
the coefficient on the treatment indicator in the linear model; defaults to -4 |
seed |
randomization seed; defaults to 1. |
a (num.obs x 2)
data frame where column 1 is the dependent variable Y
and column 2 is the treatment indicator D
dgenSimpleLinear(num.obs=50, intercept=2, treatment.effect=-4, seed=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.