logLik | R Documentation |
logLik
extracts the log-likelihood value(s) from classic or latent class
stochastic frontier models estimated with sfacross
or lcmcross
.
## S3 method for class 'sfacross' logLik(object, individual = FALSE, ...) ## S3 method for class 'lcmcross' logLik(object, individual = FALSE, ...)
object |
A classic or latent class stochastic frontier model returned by
|
individual |
Logical. If |
... |
Currently ignored. |
logLik
returns an object of class 'logLik'
, which is either a
numeric matrix with the log-likelihood value (logLik
), the total number of
observations (Nobs
) and the number of free parameters (df
), when
individual = FALSE
,
or a list of elements, containing the log-likelihood of each observation (logLik
), the
total number of observations (Nobs
) and the number of free parameters (df
),
when individual = TRUE
.
K Hervé Dakpo, Yann Desjeux and Laure Latruffe
sfacross
, for the stochastic frontier analysis model fitting function.
lcmcross
, for the latent class stochastic frontier analysis
model fitting function.
## Using data on fossil fuel fired steam electric power generation plants in the U.S. # Translog SFA (cost function) truncated normal with scaling property tl_u_ts <- sfacross(formula = log(tc/wf) ~ log(y) + I(1/2 * (log(y))^2) + log(wl/wf) + log(wk/wf) + I(1/2 * (log(wl/wf))^2) + I(1/2 * (log(wk/wf))^2) + I(log(wl/wf) * log(wk/wf)) + I(log(y) * log(wl/wf)) + I(log(y) * log(wk/wf)), udist = "tnormal", muhet = ~ regu, uhet = ~ regu, data = utility, S = -1, scaling = TRUE, method = "mla") logLik(tl_u_ts) ## Using data on eighty-two countries production (DGP) # LCM Cobb Douglas (production function) half normal distribution cb_2c_h <- lcmcross(formula = ly ~ lk + ll + yr, udist = "hnormal", data = worldprod, S = 1) logLik(cb_2c_h, individual = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.