5.4 Random-coefficients stochastic frontier
Mathematical representation
(5.4) |
- the model is estimated using observations from groups, each group observed for periods (balanced or unbalanced panels); the total number of observations is and could be equal to one for all (cross-sectional data)
- is the value of the dependent variable for group , observed in period
- is a vector that stores the values of the independent variables which are associated with group-specific coefficients, for group , observed in period
- is an vector that stores the values of the independent variables which are associated with coefficients common to all groups, for group , observed in period ( could be zero)
- is a vector of parameters associated with group
- is a vector of parameters that represents the mean of the s
- is a precision matrix for the distribution of the s
- is an vector of parameters
- is the precision of the noise component of the error term:
-
is the inefficiency component of the error term for group
in
period
and it can have any non-negative distribution, represented in the equation above by
; BayES supports the
following distributions for :
- exponential:
- half normal:
When enters the specification with a plus sign then the model represents a cost frontier, while when 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. |
No time dependence is imposed on the inefficiency component of the error term: each is treated as an independent draw from . |
Calculation of the log-marginal likelihood for the model is performed by integrating-out the s 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 () to determine the number of draws to be used for this integration. However, approximation of an integral of dimension for each group, , by simulation may be imprecise if 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
| ||
, | ||
, | ||
, | ||
, | ||
Exponential model
| ||
, | ||
Half normal model
| ||
, | ||
Syntax
where:
- y is the dependent variable name, as it appears in the dataset used for estimation
- z1 z2 zK is a list of the names, as they appear in the dataset used for estimation, of the independent variables which are associated with group-specific coefficients; when a constant term is to be included in the set of group-specific coefficients this must be requested explicitly
- x1 x2 xL is is a list of the names, as they appear in the dataset used for estimation, of the independent variables which are associated with coefficients common to all groups; when a constant term is to be included in the set of common coefficients, this must be requested explicitly
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. |
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. |
For groups observed only once, a group-specific parameter associated with a constant term cannot be distinguished from the error term (). 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:
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 ( vector); the default value is |
"P_gamma" | precision matrix of the prior for ( symmetric and positive-definite matrix); the default value is |
"V" | scale matrix of the prior for ( symmetric and positive-definite matrix); the default value is |
"n" | degrees-of-freedom parameter of the prior for (real number greater than or equal to ); the default value is |
"m_beta" | mean vector of the prior for ( vector); the default value is |
"P_beta" | precision matrix of the prior for ( symmetric and positive-definite matrix); the default value is |
"a_tau" | shape parameter of the prior for (positive number); the default value is |
"b_tau" | rate parameter of the prior for (positive number); the default value is |
Exponential model
| |
"a_lambda" | shape parameter of the prior for (positive number); the default value is |
"b_lambda" | rate parameter of the prior for (positive number); the default value is |
Half normal model | |
"a_phi" | shape parameter of the prior for (positive number); the default value is |
"b_phi" | rate parameter of the prior for (positive number); the default value is |
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 (truefalse); 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, |
| sigma_v | standard deviation of the noise component of the error term, |
Exponential model
| ||
| lambda | rate parameter of the distribution of the inefficiency component of the error term, |
| sigma_u | scale parameter of the inefficiency component of the error term: . For the exponential model the standard deviation of is equal to the scale parameter. |
Half normal model | ||
| phi | precision parameter of the distribution of the inefficiency component of the error term, |
| sigma_u | scale parameter of the inefficiency component of the error term: . The standard deviation of for the half-normal model can be obtained as . |
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 of its elements are stored (instead of all elements); i and j index the row and column of , respectively, at which the corresponding element is located |
Omega | 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 | 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 | vector that stores the expected values of the observation-specific efficiency scores, ; 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):
- diagnostics()
- test()
- pmp()
- store()
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:
and:
The first statement will generate 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.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.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.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).