| simulate_panel_metafrontier | R Documentation |
Generates a simulated panel dataset with known metafrontier parameters for Monte Carlo studies and testing. Implements the Battese-Coelli 1992 DGP with time-varying inefficiency.
simulate_panel_metafrontier(
n_groups = 2,
n_firms_per_group = 30,
n_periods = 5,
beta_meta = c(1, 0.5, 0.3),
tech_gap = NULL,
sigma_u = 0.3,
sigma_v = 0.2,
eta = 0.05,
seed = NULL,
attrition = 0
)
n_groups |
integer. Number of technology groups. |
n_firms_per_group |
integer. Number of firms per group. |
n_periods |
integer. Number of time periods. |
beta_meta |
numeric vector. Metafrontier coefficients. |
tech_gap |
numeric vector of group technology gaps. |
sigma_u |
numeric. Standard deviation of the firm effect. |
sigma_v |
numeric. Standard deviation of noise. |
eta |
numeric. Time-decay parameter for BC92. |
seed |
integer or NULL. Random seed. |
attrition |
numeric in [0, 0.5]. Probability that each
firm-period observation after a firm's first period is dropped
independently, producing an unbalanced panel. Every firm's first
period is always kept, so all firms remain in the data. The
attrition draws are made after all other random numbers, so
|
A list with components:
data frame with columns: firm, year,
group, log_y, log_x1, log_x2,
true_te, true_u, true_v
list of true parameter values used in generation,
including attrition and the realised
attrition_share
sim <- simulate_panel_metafrontier(
n_groups = 2, n_firms_per_group = 20,
n_periods = 5, seed = 42
)
head(sim$data)
str(sim$params)
# An unbalanced panel with roughly 20% attrition
sim_unbal <- simulate_panel_metafrontier(seed = 42, attrition = 0.2)
table(table(sim_unbal$data$firm))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.