generate_data | R Documentation |
generate_data
draws random data for a 2SLS model given the parameters.
generate_data(parameters, n)
parameters |
A list with 2SLS model parameters as created by generate_param. |
n |
Sample size to be drawn. |
generate_data
returns a data frame with n
rows
(observations) and the following variables of the 2SLS model: dependent
variable y, exogenous regressors x1, endogenous regressors x2, structural
error u, outside instruments z2, first stage projection errors r1 (identical
to zero) and r2.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.