| latent_class_metafrontier | R Documentation |
Estimates a metafrontier model where group membership is unobserved, using an EM algorithm to jointly estimate class membership probabilities, class-specific frontier parameters, and the metafrontier.
latent_class_metafrontier(
formula,
data,
n_classes = 2,
dist = c("hnormal", "tnormal", "exponential"),
meta_type = c("deterministic", "stochastic"),
n_starts = 10,
max_iter = 200,
tol = 1e-06,
seed = NULL,
control = list(),
...
)
formula |
a |
data |
a data frame. |
n_classes |
integer. Number of latent classes (default 2). |
dist |
distribution of the inefficiency term. |
meta_type |
metafrontier type for Stage 2. |
n_starts |
integer. Number of random initializations (default 10). The best is selected by log-likelihood. |
max_iter |
integer. Maximum EM iterations (default 200). |
tol |
numeric. Convergence tolerance on marginal LL (default 1e-6). |
seed |
optional integer seed. |
control |
list of control parameters for the optimiser. |
... |
additional arguments. |
Latent class estimation is available for SFA-based metafrontiers
only: the EM posterior class probabilities require a parametric
observation-level likelihood, which DEA does not provide. For DEA
fits with observed groups, see poolability_test.
The EM algorithm iterates between:
E-step: compute posterior class membership probabilities for each observation using Bayes' rule
M-step: update class-specific frontier parameters via weighted MLE, and update class proportions
Multiple random starts (n_starts) are used to avoid local optima.
The run with the highest marginal log-likelihood is selected.
After convergence, observations are assigned to classes via MAP
(maximum a posteriori), and a standard metafrontier is fitted on the
MAP classes.
An object of class "lc_metafrontier" containing:
MAP class assignment per observation
n x C matrix of posterior probabilities
class mixing proportions
list of class-specific parameter vectors
list of class-specific model summaries
the fitted metafrontier object on MAP classes
marginal log-likelihood at convergence
Bayesian Information Criterion
number of classes
number of EM iterations used
sim <- simulate_metafrontier(n_groups = 2, n_per_group = 80, seed = 42)
lc <- latent_class_metafrontier(
log_y ~ log_x1 + log_x2,
data = sim$data, n_classes = 2, n_starts = 3, seed = 123
)
print(lc)
summary(lc)
coef(lc, which = "meta")
efficiencies(lc, type = "tgr")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.