Description Usage Arguments Value
View source: R/simulation-lib.R
Generates X using gen_dist
and then generates
Y = beta_0 + XB + eps, #' where eps is generated according to
error_dist
. NOT exported to the user.
1 | gen_data(n, true_betas, gen_dist = gen_xs_default, error_dist = rnorm, ...)
|
n |
Number of observations |
true_betas |
A vector of true values of regression coefficients. Should include the intercept as the first item, beta1 as the second, etc. |
gen_dist |
A function specifiying how to generate the
covariates. Should take |
error_dist |
A function specifying how to generate the errors.
Should take |
... |
Additional arguments to gen_dist |
A list lst
, with element lst$xs
corresponding to the
covariates and lst$ys
corresponding to the responses.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.