BayES BayES

5.1 Simple stochastic frontier

Mathematical representation

yi = xiβ + v i ± ui,vi N 0, 1 τ ,ui D 𝜃 (5.1)

PIC When ui enters the specification with a plus sign then the model represents a cost frontier, while when ui enters with a minus sign the model represents a production frontier. For the efficiency scores generated by a stochastic frontier model to be meaningful, the dependent variable in both cases must be in logarithms.

Priors




Parameter Probability density function Default hyperparameters



Common to all models
β p β = |P|12 2πK2 exp 1 2 β mP β m m = 0 K, P = 0.001 IK
τ p τ = bτaτ Γaτ τaτ1eτbτ aτ = 0.001, bτ = 0.001
Exponential model
λ p λ = bλaλ Γaλ λaλ1eλbλ a λ = 1, bλ = 0.15
Half normal model
ϕ p ϕ = bϕaϕ Γaϕ ϕaϕ1eϕbϕ a ϕ = 7, bϕ = 0.5
Truncated normal model
μ p μ = tμ12 2π12 exp tμ 2 μ mμ 2 m μ = 0, tμ = 1
ϕ p ϕ = bϕaϕ Γaϕ ϕaϕ1eϕbϕ a ϕ = 5, bϕ = 0.5
Gamma model
κ p κ = bκaκ Γaκ κaκ1eκbκ aκ = 3, bκ = 2
λ p λ = bλaλ Γaλ λaλ1eλbλ a λ = κ, bλ = 0.2
Log-normal model
μ p μ = tμ12 2π12 exp tμ 2 μ mμ 2 m μ = 1.5, tμ = 1
ϕ p ϕ = bϕaϕ Γaϕ ϕaϕ1eϕbϕ a ϕ = 2, bϕ = 1



Syntax

[<model name> = ] sf( y ~ x1 x2  xK [, <options> ] );

where:

The optional arguments for the simple stochastic frontier model are:1

Gibbs parameters


"chains"

number of chains to run in parallel (positive integer); the default value is 1

"burnin"

number of burn-in draws per chain (positive integer); the default value is 10000

"draws"

number of retained draws per chain (positive integer); the default value is 20000

"thin"

value of the thinning parameter (positive integer); the default value is 1

"seed"

value of the seed for the random-number generator (positive integer); the default value is 42

Model specification


"udist"

specification of the distribution of the inefficiency component of the error term; the following options are available, corresponding to the distributions presented at the beginning of this section:

  • "exp"
  • "hnorm"
  • "tnorm"
  • "gamma"
  • "lognorm"

the default value is "exp"

"production"

boolean specifying the type of frontier (production/cost); it could be set to either true (production) or false (cost); the default value is true

Hyperparameters


Common to all models

"m"

mean vector of the prior for β (K ×1 vector); the default value is 0K

"P"

precision matrix of the prior for β (K ×K symmetric and positive-definite matrix); the default value is 0.001 IK

"a_tau"

shape parameter of the prior for τ (positive number); the default value is 0.001

"b_tau"

rate parameter of the prior for τ (positive number); the default value is 0.001

Exponential model

"a_lambda"

shape parameter of the prior for λ (positive number); the default value is 1

"b_lambda"

rate parameter of the prior for λ (positive number); the default value is 0.15

Half normal model

"a_phi"

shape parameter of the prior for ϕ (positive number); the default value is 7

"b_phi"

rate parameter of the prior for ϕ (positive number); the default value is 0.5

Truncated normal model

"m_mu"

location parameter of the prior for μ (real number); the default value is 0

"t_mu"

precision parameter of the prior for μ (positive number); the default value is 1

"a_phi"

shape parameter of the prior for ϕ (positive number); the default value is 5

"b_phi"

rate parameter of the prior for ϕ (positive number); the default value is 0.5

Gamma model

"a_kappa"

shape parameter of the prior for κ (positive number); the default value is 3

"b_kappa"

rate parameter of the prior for κ (positive number); the default value is 2

"b_lambda"

rate parameter of the prior for λ (positive number); the default value is 0.2

Log-normal model

"m_mu"

location parameter of the prior for μ (real number); the default value is 1.5

"t_mu"

precision parameter of the prior for μ (positive number); the default value is 1

"a_phi"

shape parameter of the prior for ϕ (positive number); the default value is 2

"b_phi"

rate parameter of the prior for ϕ (positive number); the default value is 1

Dataset and log-marginal likelihood


"dataset"

the id value of the dataset that will be used for estimation; the default value is the first dataset in memory (in alphabetical order)

"logML_CJ"

boolean indicating whether the Chib (1995)/Chib & Jeliazkov (2001) approximation to the log-marginal likelihood should be calculated (true|false); the default value is false

Reported Parameters




Common to all models



β

variable_name

vector of parameters associated with the independent variables




τ

tau

precision parameter of the noise component of the error term, vi




σv

sigma_v

standard deviation of the noise component of the error term, σv = 1τ12




Exponential model



λ

lambda

rate parameter of the distribution of the inefficiency component of the error term, ui




σu

sigma_u

scale parameter of the inefficiency component of the error term: σu = 1λ. For the exponential model the standard deviation of ui is equal to the scale parameter.




Half normal model



ϕ

phi

precision parameter of the distribution of the inefficiency component of the error term, ui




σu

sigma_u

scale parameter of the inefficiency component of the error term: σu = 1ϕ12. The standard deviation of ui for the half-normal model can be obtained as σu1 2 π.




Truncated normal model



μ

mu

location parameter of the distribution of the inefficiency component of the error term, ui




ϕ

phi

precision parameter of the distribution of the inefficiency component of the error term, ui




σu

sigma_u

scale parameter of the inefficiency component of the error term: σu = 1ϕ12. The standard deviation of ui for the truncated-normal model can be obtained as σu1 2 μ σuϕ μ σu 4ϕ2 μ σu.




Gamma model



κ

kappa

shape parameter of the distribution of the inefficiency component of the error term, ui




λ

lambda

rate parameter of the distribution of the inefficiency component of the error term, ui




𝜃

theta

scale parameter of the inefficiency component of the error term: 𝜃 = 1λ. The standard deviation of ui for the Gamma model can be obtained as 𝜃κ.




Log-normal model



μ

mu

location parameter of the distribution of the inefficiency component of the error term, ui




ϕ

phi

precision parameter of the distribution of the inefficiency component of the error term, ui




σu

sigma_u

scale parameter of the inefficiency component of the error term: σu = 1ϕ12. The standard deviation of ui for the log-normal model can be obtained as eσu 2 1 e2μ+σu 2 .




Stored values and post-estimation analysis
If a left-hand-side id value is provided when a simple stochastic frontier model is created, then the following results are saved in the model item and are accessible via the ‘.’ operator:

Samples

a matrix containing the draws from the posterior of β and τ, and, depending on the estimated model, λ, μ, ϕ, κ

x1,,xK

vectors containing the draws from the posterior of the parameters associated with variables x1,,xK (the names of these vectors are the names of the variables that were included in the right-hand side of the model)

tau

vector containing the draws from the posterior of τ

lambda

vector containing the draws from the posterior of λ (available after the estimation of the exponential and Gamma models)

mu

vector containing the draws from the posterior of μ (available after the estimation of the truncated-normal and log-normal models)

phi

vector containing the draws from the posterior of ϕ (available after the estimation of the half-normal, truncated-normal and log-normal models)

kappa

vector containing the draws from the posterior of κ (available after the estimation of the Gamma model)

logML

the Lewis & Raftery (1997) approximation of the log-marginal likelihood

logML_CJ

the Chib (1995)/Chib & Jeliazkov (2001) approximation to the log-marginal likelihood; this is available only if the model was estimated with the "logML_CJ"=true option

eff_i

N ×1 vector that stores the expected values of the observation-specific efficiency scores, E eui; the values in this vector are not guaranteed to be in the same order as the order in which the observations appear in the dataset used for estimation; use the store() function to associate the values in eff_i with the observations in the dataset

nchains

the number of chains that were used to estimate the model

nburnin

the number of burn-in draws per chain that were used when estimating the model

ndraws

the total number of retained draws from the posterior ( =chains draws)

nthin

value of the thinning parameter that was used when estimating the model

nseed

value of the seed for the random-number generator that was used when estimating the model

Additionally, the following functions are available for post-estimation analysis (see section B.14):

The simple stochastic frontier model uses the store() function to associate the estimates of the efficiency scores (eff_i) with specific observations and store their values in the dataset used for estimation. The generic syntax for a statement involving the store() function after estimation of a simple stochastic frontier model is:

store( eff_i, <new variable name> [, "model"=<model name>] );

Examples

Example 1

myData = import("$BayESHOME/Datasets/dataset1.csv"); 
myData.constant = ones(rows(myData), 1); 
 
sf( y ~ constant x1 x2 x3, "logML_CJ" = true );

Example 2

myData = import("$BayESHOME/Datasets/dataset1.csv"); 
myData.constant = ones(rows(myData), 1); 
 
expSF = sf( y ~ constant x1 x2 x3, 
    "a_lambda"=-log(0.8), "b_lambda"=1.0, 
    "logML_CJ"=true ); 
 
hnSF = sf( y ~ constant x1 x2 x3, 
    "udist" = "hnorm", 
    "a_phi"=7.0, "b_phi"=0.5, 
    "logML_CJ"=true ); 
 
pmp( { expSF, hnSF } ); 
pmp( { expSF, hnSF }, "logML_CJ"=true); 
 
store( eff_i, eff_exp, "model"=expSF ); 
store( eff_i, eff_hn, "model"=hnSF ); 
 
hist(myData.eff_exp, 
    "title"="Efficiency scores from the exponential model", 
    "grid"="on"); 
hist(myData.eff_hn, 
    "title"="Efficiency scores from the halfnormal model", 
    "grid"="on");

1Optional arguments are always given in option-value pairs (eg. "chains"=3).

Share this content:
Facebook Twitter LinkedIn Email
© 2016–20 Grigorios Emvalomatis