| snsf | R Documentation |
snsf performs maximum likelihood estimation of the parameters and
technical or cost efficiencies in a Stochastic Frontier Model with a
skew-normally distributed error term.
snsf(
formula,
data,
subset,
distribution = "e",
prod = TRUE,
start.val = NULL,
init.sk = NULL,
ln.var.u = NULL,
ln.var.v = NULL,
skew.v = NULL,
mean.u = NULL,
technique = c("nr"),
vcetype = c("aim"),
optim.method = "bfgs",
optim.report = 1,
optim.trace = 1,
reltol = 1e-12,
optim.reltol = 1e-12,
lmtol = 1e-05,
maxit = 199,
print.level = 0,
threads = 1,
only.data = FALSE,
digits = 4,
...
)
formula |
an object of class |
data |
an optional |
subset |
an optional logical or numeric vector specifying a subset of observations for which the model is estimated and efficiencies are computed. |
distribution |
character scalar specifying the distribution of the inefficiency term: default |
prod |
logical. If |
start.val |
optional numeric vector of starting values for the optimizer. |
init.sk |
numeric. Initial value for the skewness parameter of the noise component;
default is |
ln.var.u |
optional one-sided formula; e.g. |
ln.var.v |
optional one-sided formula; e.g. |
skew.v |
optional one-sided formula; e.g. |
mean.u |
optional one-sided formula; e.g. |
technique |
Optimization technique to use. |
vcetype |
Type of variance-covariance matrix estimation. |
optim.method |
character. Method passed to |
optim.report |
integer. Verbosity level for reporting during optimization (if implemented).
Default is |
optim.trace |
integer. Trace level for optimization (if implemented). Default is |
reltol |
numeric. Relative convergence tolerance used when maximizing the log-likelihood. |
optim.reltol |
numeric. Relative tolerance specifically for |
lmtol |
numeric. Convergence tolerance based on the scaled gradient (when applicable).
Default is |
maxit |
numeric. Maximum number of iterations for the optimizer. Default is |
print.level |
integer. Printing level: |
threads |
Number of threads for parallel computation. |
only.data |
Logical; if TRUE, return only processed data. |
digits |
integer. Number of digits for displaying estimates and efficiencies. Default is |
... |
Additional arguments (currently unused). |
optim |
logical. If |
report |
Reporting level for optimization progress. |
trace |
Logical; if TRUE, trace optimization progress. |
Stochastic Frontier Model with a Skew-Normally Distributed Error Term
Models for snsf are specified symbolically. A typical model has the form
y ~ x1 + ..., where y represents the logarithm of outputs or total
costs and {x1, ...} is a set of inputs (for production) or outputs and
input prices (for cost), all typically in logs.
Options ln.var.u and ln.var.v allow for multiplicative
heteroskedasticity in the inefficiency and/or noise components; i.e., their
variances can be modeled as exponential functions of exogenous variables
(including an intercept), as in Caudill et al. (1995).
An object of class "snreg" with maximum-likelihood estimates and diagnostics:
parNumeric vector of ML parameter estimates at the optimum.
coefNamed numeric vector equal to par.
vcovVariance–covariance matrix of the estimates.
sdsStandard errors, sqrt(diag(vcov)).
ctabCoefficient table with columns
Coef., SE, z, P>|z|.
llMaximized log-likelihood value.
hessian(When computed) Observed Hessian or OPG used to form vcov.
value(Optim-only, before aliasing) Objective value from optim.
counts(Optim-only) Iteration and evaluation counts from optim.
convergenceConvergence code).
message(Optim-only) Message returned by optim, if any.
gradient(NR-only) Gradient at the solution.
gg(NR-only) Gradient-related diagnostic.
gHg(NR-only) Newton-step diagnostic.
theta_rel_ch(NR-only) Relative parameter change metric across iterations.
residRegression residuals.
RSSResidual sum of squares crossprod(resid).
shat2Residual variance estimate var(resid).
shatResidual standard deviation sqrt(shat2).
aicAkaike Information Criterion.
bicBayesian Information Criterion.
MallowsMallows' C_p-like statistic.
uEstimated inefficiency term (vector). Returned for models with an inefficiency component (e.g., exponential).
effEfficiency scores exp(-u) (technical or cost, depending on prod).
svEstimated (possibly unit-specific) standard deviation of the noise term.
suEstimated (possibly unit-specific) standard deviation or scale of the inefficiency term. For exponential models.
skewnessEstimated skewness index (e.g., from the skewness equation).
esampleLogical vector marking observations used in estimation.
nNumber of observations used.
The returned object has class "snreg".
Oleg Badunenko <Oleg.Badunenko.brunel.ac.uk>
Badunenko, O., & Henderson, D. J. (2023). Production analysis with asymmetric noise. Journal of Productivity Analysis, 61(1), 1–18. https://doi.org/10.1007/s11123-023-00680-5
Caudill, S. B., Ford, J. M., & Gropper, D. M. (1995). Frontier estimation and firm-specific inefficiency measures in the presence of heteroskedasticity. Journal of Business & Economic Statistics, 13(1), 105–111.
sf, snreg, lm.mle
library(snreg)
data("banks07")
# Translog cost function specification
myprod <- FALSE
spe.tl <- log(TC) ~ (log(Y1) + log(Y2) + log(W1) + log(W2))^2 +
I(0.5 * log(Y1)^2) + I(0.5 * log(Y2)^2) +
I(0.5 * log(W1)^2) + I(0.5 * log(W2)^2)
# Specification 1: homoskedastic noise, skewness, inefficiency
formSV <- NULL # variance equation; constant variance
formSK <- NULL # skewness equation; constant skewness
formSU <- NULL # inefficiency variance equation; constant variance
m1 <- snsf(
formula = spe.tl,
data = banks07,
prod = myprod,
ln.var.v = formSV,
skew.v = formSK,
ln.var.u = formSU
)
# Specification 2: heteroskedastic
formSV <- ~ log(TA) # variance equation; heteroskedastic noise (variance depends on TA)
formSK <- ~ ER # skewness equation; with determinants (skewness is determined by ER)
formSU <- ~ LA + ER # inefficiency variance equation; heteroskedastic noise of inefficiency
# ([variance of] inefficiency depends on LA and ER)#'
m2 <- snsf(
formula = spe.tl,
data = banks07,
prod = myprod,
ln.var.v = formSV,
skew.v = formSK,
ln.var.u = formSU
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.