generate_data {robust2sls} | R Documentation |
Random data of 2SLS model (Monte Carlo)
Description
generate_data
draws random data for a 2SLS model given the parameters.
Usage
generate_data(parameters, n)
Arguments
parameters |
A list with 2SLS model parameters as created by generate_param. |
n |
Sample size to be drawn. |
Value
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.
[Package robust2sls version 0.2.2 Index]