linearmodels.panel.utility.generate_panel_data¶
- generate_panel_data(nentity=971, ntime=7, nexog=5, const=False, missing=0, other_effects=2, ncats=4, rng=None)[source]¶
- Parameters
- nentity
int
The number of entities in the panel.
- ntime
int
The number of time periods in the panel.
- nexog
int
The number of explanatory variables in the dataset.
- constbool
Flag indicating that the model should include a constant.
- missing
float
The percentage of values that are missing. Should be between 0 and 100.
- other_effects
int
The number of other effects generated.
- ncats
Union
[int
,Sequence
[int
]] The number of categories to use in other_effects and variance clusters. If list-like, then it must have as many elements as other_effects.
- rng
RandomState
A NumPy RandomState instance. If not provided, one is initialized using a fixed seed.
- nentity
- Returns
PanelModelData
A namedtuple derived class containing 4 DataFrames:
data - A simulated data with variables y and x# for # in 0,…,4. If const is True, then also contains a column named const.
weights - Simulated non-negative weights.
other_effects - Simulated effects.
clusters - Simulated data to use in clustered covariance estimation.
- Return type