simGLM {alpaca} | R Documentation |
Constructs an artificial data set with n cross-sectional units observed for t time periods for logit, poisson, or gamma models. The “true” linear predictor (η) is generated as follows:
η = X β + α + γ,
where X consists of three independent standard normally distributed regressors. Both parameter refering to the unobserved heterogeneity (α and γ) are generated as iid. standard normal and the structural parameters are set to β = [1, - 1, 1]'.
Note: The poisson and gamma model are based on the logarithmic link function.
simGLM(n = NULL, t = NULL, seed = NULL, model = c("logit", "poisson", "gamma"))
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 |
The function simGLM
returns a data.frame with 6 variables.