Function simulates data for tests and examples with clustering variables and fixed-effects.
create_data(N, N_G1, icc1, N_G2, icc2, numb_fe1, numb_fe2, seed, weights)
number of observations
A scalar. number of clusters for clustering variable 1
A scalar between 0 and 1. intra-cluster correlation for clustering variable 1
A scalar. number of clusters for clustering variable 2
A scalar between 0 and 1. intra-cluster correlation for clustering variable 2
A scalar. Number of fixed effect for first factor variable
A scalar. Number of fixed effect for second factor variable
An integer. Set the random seed
Possible regression weights to be used in estimation
A simulated data.frame
with specified numbers of clusters,
intra-cluster correlations and dimensionality of fixed effects.