simGLM {alpaca} | R Documentation |
Generate an artificial data set for some GLM's with two-way fixed effects
Description
Constructs an artificial data set with cross-sectional units observed for
time
periods for logit, poisson, or gamma models. The “true” linear predictor
(
) is generated as follows:
where consists of three independent standard normally distributed regressors.
Both parameter referring to the unobserved heterogeneity (
and
) are generated as iid. standard normal and the structural parameters are
set to
.
Note: The poisson and gamma model are based on the logarithmic link function.
Usage
simGLM(n = NULL, t = NULL, seed = NULL, model = c("logit", "poisson", "gamma"))
Arguments
n |
a strictly positive integer equal to the number of cross-sectional units. |
t |
a strictly positive integer equal to the number of time periods. |
seed |
a seed to ensure reproducibility. |
model |
a string equal to |
Value
The function simGLM
returns a data.frame with 6 variables.