BayES BayES

5.8 Random-effects dynamic stochastic frontier

Mathematical representation

yit = αi + xitβ + v it ± uit, vit N 0, 1 τ ,αi N 0, 1 ω (5.11) sit = f uit (5.12) sit = zitδ + ρs i,t1 + ξit, ξit N 0, 1 ϕ (5.13) si1 = zi1δ 1 ρ + ξi1, ξi1 N 0, 1 ϕ1ρ2 (5.14)

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.

PIC The mean of the distribution of the αis is restricted to zero and, therefore, these are simply group-specific errors terms. However, including a constant term in the set of independent variables is valid and leads to a specification equivalent to one where the group effects are draws from a normal distribution with mean equal to the parameter associated with the constant term and precision ω.

PIC Due to Metropolis-Hastings updates used by BayES in the estimation of dynamic stochastic frontier models, the draws from the posterior are likely to have very large autocorrelation times. Therefore, long burn-ins are recommended (above 30,000 draws) and large thinning parameters if machine memory is an issue.

Priors




Parameter Probability density function Default hyperparameters



β p β = |Pβ|12 2πK2 exp 1 2 β mβ P β β mβ mβ = 0K, Pβ = 0.001 IK
τ p τ = bτaτ Γaτ τaτ1eτbτ aτ = 0.001, bτ = 0.001
ω p ω = bωaω Γaω ωaω1eωbω aω = 0.01, bω = 0.001
δ p δ = |Pδ|12 2πL2 exp 1 2 δ mδ P δ δ mδ mδ = 0L, Pδ = 0.001 IL
ρ p ρ = ρaρ1 1ρρbρ1 Baρ,bρ aρ = 4.0, bρ = 2.0
ϕ p ϕ = bϕaϕ Γaϕ ϕaϕ1eϕbϕ a ϕ = 0.1, bϕ = 0.01



Syntax

[<model name> = ] sf_dyn_re( y ~ x1 x2  xK | z1 z2  zL [,<options> ] );

where:

PIC BayES automatically drops from the sample used for estimation groups which are observed only once. This is because for these groups the group effect (αi) cannot be distinguished from the noise component of the error term (vit).

PIC Groups that contain observations which are not consecutive according to the panel time variable (for example, a group is observed for two consecutive periods, not observed for the following period and observed again for another string of consecutive time periods) are split into multiple groups, with each string of consecutive observations treated as a different group. A warning is produced when the dataset used for estimation contains groups with gaps in the time dimension.

The optional arguments for the random-effects dynamic stochastic frontier model are:10

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:

  • "explogitn"
  • "logn"

the default value is "explogitn"

"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


"m_beta"

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

"P_beta"

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

"a_omega"

shape parameter of the prior for ω (positive number); the default value is 0.01

"b_omega"

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

"m_delta"

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

"P_delta"

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

"a_rho"

alpha parameter of the prior for ρ (positive number); the default value is 4

"b_rho"

beta parameter of the prior for ρ (positive number); the default value is 2

"a_phi"

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

"b_phi"

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

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




β

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




ω

omega

precision parameter of the group-specific error term, αi




δ

variable_name

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




ϕ

phi

precision parameter of the error term in the hidden-state equation of the error term, ui




σv

sigma_v

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




σα

sigma_alpha

standard deviation of the group-specific error term: σα = 1ω12




σs

sigma_s

standard deviation of the error term in the hidden-state equation: σα = 1ϕ12




Stored values and post-estimation analysis
If a left-hand-side id value is provided when a random-effects dynamic 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 ϕ

y$x1,,y$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, prepended by y$, where y is the name of the dependent variable; this is done so that the samples on the parameters associated with a variable that appears in both x and z lists can be distinguished)

tau

vector containing the draws from the posterior of τ

omega

vector containing the draws from the posterior of ω

s$z1,,s$zL

vectors containing the draws from the posterior of the parameters associated with variables z1,,zL (the names of these vectors are the names of the variables that were included in the z list, in the right-hand side of the model, prepended by s$; this is done so that the samples on the parameters associated with a variable that appears in both x and z lists can be distinguished)

rho

vector containing the draws from the posterior of ρ

phi

vector containing the draws from the posterior of ϕ (available after the estimation of the truncated-normal 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

alpha_i

N ×1 vector that stores the group-specific errors; the values in this vector 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 alpha_i with the observations in the dataset

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 random-effects dynamic stochastic frontier model uses the store() function to associate the group effects (alpha_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-effects dynamic stochastic frontier model and for each of these two quantities is:

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

and:

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

Examples

Example 1

myData = import("$BayESHOME/Datasets/dataset1.csv", ","); 
myData.constant = ones(rows(myData), 1); 
set_pd( year, id, "dataset" = myData); 
 
explogitnSF = sf_dyn_re( y ~ constant x1 x2 x3 | constant z2 );

Example 2

myData = import("$BayESHOME/Datasets/dataset1.csv", ","); 
myData.constant = ones(rows(myData), 1); 
set_pd( year, id, "dataset" = myData); 
 
explogitnSF = sf_dyn_re( y ~ constant x1 x2 x3 | constant z2, 
    "udist" = "explogitn" ); 
 
lognSF = sf_dyn_re( y ~ constant x1 x2 x3 | constant z2, 
    "udist" = "logn" ); 
 
store( alpha_i, re_explogitn, "model" = explogitnSF ); 
store( alpha_i, re_logn, "model" = lognSF ); 
 
store( eff_i, eff_explogitn, "model" = explogitnSF ); 
store( eff_i, eff_logn, "model" = lognSF ); 
 
pmp( { explogitnSF, lognSF } );

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

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