BayES BayES

5.4 Random-coefficients stochastic frontier

Mathematical representation

yit = zitγ i + xitβ + v it ± uit,vit N 0, 1 τ ,γi N γ̄,Ω1 ,u it D 𝜃 (5.4)

PIC When uit enters the specification with a plus sign then the model represents a cost frontier, while when uit 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.

PIC No time dependence is imposed on the inefficiency component of the error term: each uit is treated as an independent draw from D 𝜃.

PIC Calculation of the log-marginal likelihood for the model is performed by integrating-out the uits from the complete-data likelihood by simulation. BayES multiplies the number of draws used for the estimation of the parameters by the maximum number of time observations per group (maxi Ti) to determine the number of draws to be used for this integration. However, approximation of an integral of dimension Ti for each group, i, by simulation may be imprecise if Ti is large. Therefore, using a large number of iterations is equired to reduce the Monte Carlo standard error associated with the value of the log-marginal likelihood.

Priors




Parameter Probability density function Default hyperparameters



Common to all models
γ̄ p γ̄ = |Pγ|12 2πK2 exp 1 2 γ̄ mγ P γ γ̄ mγ mγ = 0K, Pγ = 0.001 IK
Ω p Ω = |Ω|nK1 2 |V1|n2 2nK2ΓKn 2 exp 1 2 tr V1Ω n = K2, V = 100 K IK
β p β = |Pβ|12 2πL2 exp 1 2 β mβ P β β mβ mβ = 0L, Pβ = 0.001 IL
τ 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



Syntax

[<model name> = ] sf_rc( y ~ z1 z2  zK [| x1 x2 xL] [, <options> ] );

where:

PIC An independent variable could be included in either the x or the z variable list, depending on whether the parameter associated with this variable is common to all groups or not. However, including a variable in both lists would lead to exact multicollinearity and, in this case, BayES will issue an error.

PIC Before using the sf_rc() function the dataset used for estimation must be declared as a panel dataset using the set_pd() function (see section B.13). In the case of cross-sectional data, the dataset still needs to be declared as a panel, but the group-id variable could be constructed as a list of unique integers using, for example, the range() function.

PIC For groups observed only once, a group-specific parameter associated with a constant term cannot be distinguished from the error term (vit). Thus, a warning is produced when a constant term is included in the z list and the dataset contains at least one group which is observed only once.

The optional arguments for the random-coefficients stochastic frontier model are:4

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"

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_gamma"

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

"P_gamma"

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

"V"

scale matrix of the prior for Ω (K ×K symmetric and positive-definite matrix); the default value is 100 K IK

"n"

degrees-of-freedom parameter of the prior for Ω (real number greater than or equal to K); the default value is K2

"m_beta"

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

"P_beta"

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

"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

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 in the z list; these are the means of the group-specific parameters




β

variable_name

vector of parameters associated with the independent variables in the x list




τ

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 π.




Stored values and post-estimation analysis
If a left-hand-side id value is provided when a random-coefficients 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 γ̄, β, τ, the unique elements of Ω and either λ (exponential model) or ϕ (half-normal model)

z1,,zK

vectors containing the draws from the posterior of the mean of the group-specific coefficients (γ̄s) associated with variables z1,,zK (the names of these vectors are the names of the variables that were included in the right-hand side of the model)

x1,,xL

vectors containing the draws from the posterior of the parameters associated with variables x1,,xL (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 model)

phi

vector containing the draws from the posterior of ϕ (available after the estimation of the half-normal model)

Omega_i_j

vectors containing the draws from the posterior of the unique elements of Ω; because Ω is symmetric, only K1K 2 + K of its elements are stored (instead of all K2 elements); i and j index the row and column of Ω, respectively, at which the corresponding element is located

Omega

K ×K matrix that stores the posterior mean of Ω

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

gamma_i

N ×K matrix that stores the group-specific coefficients for the variables in the z list; the values in this matrix are not guaranteed to be in the same order as the order in which the groups appear in the dataset used for estimation; use the store() function to associate the values in gamma_i with the observations in the dataset

eff_i

i=1NTi ×1 vector that stores the expected values of the observation-specific efficiency scores, E euit; 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 random-coefficients stochastic frontier model uses the store() function to associate the group-specific parameters (gamma_i) or 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 random-coefficients stochastic frontier model and for each of these two quantities is:

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

and:

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

The first statement will generate K additional variables in the dataset used for estimation of the random-coefficients model, with names constructed by prepending the prefix provided as the second argument to store() to the names of the variables which are associated with group-specific coefficients. The second statement will generate one additional variable in the dataset used for estimation of the model and its name will be the one provided as the second argument to store().

Examples

Example 1

myData = import("$BayESHOME/Datasets/dataset2.csv", ","); 
myData.constant = ones(rows(myData), 1); 
set_pd( year, id, "dataset" = myData); 
 
// all rhs variables are associated with group-specific coefficients 
sf_rc( y ~ constant x1 x2 x3);

Example 2

myData = import("$BayESHOME/Datasets/dataset2.csv", ","); 
myData.constant = ones(rows(myData), 1); 
set_pd( year, id, "dataset" = myData); 
 
// only the constant term and the coefficient associated with x1 are 
// group-specific; the coefficients on x2 and x3 are common to all groups 
sf_rc( y ~ constant x1 | x2 x3);

Example 3

myData = import("$BayESHOME/Datasets/dataset2.csv", ","); 
myData.constant = ones(rows(myData), 1); 
set_pd( year, id, "dataset" = myData); 
 
// all rhs variables are associated with group-specific coefficients 
model1 = sf_rc(y ~ constant x1 x2 x3, "udist"="hnorm", 
    "burnin"=10000, "draws"=40000, "thin"=4, "chains"=2, 
    "logML_CJ" = true, "dataset"=myData); 
store( gamma_i, rc1_, "model" = model1 ); 
 
// only the constant term and the coefficient associated with x1 are 
// group-specific; the coefficients on x2 and x3 are common to all groups 
model2 = lm_rc( y ~ constant x1 | x2 x3, "udist"="hnorm", 
    "burnin"=10000, "draws"=40000, "thin"=4, "chains"=2, 
    "logML_CJ" = true, "dataset"=myData); 
store( gamma_i, rc2_, "model" = model2 ); 
 
pmp( { model1, model2 } );

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

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