| vcov | R Documentation |
vcov computes the variance-covariance matrix of the maximum
likelihood (ML) coefficients from stochastic frontier models estimated with
sfacross, sfalcmcross,
or sfaselectioncross.
## S3 method for class 'sfacross'
vcov(object, extraPar = FALSE, ...)
## S3 method for class 'sfalcmcross'
vcov(object, ...)
## S3 method for class 'sfaselectioncross'
vcov(object, extraPar = FALSE, ...)
object |
A stochastic frontier model returned
by |
extraPar |
Logical. Only available for non heteroscedastic models
returned by
|
... |
Currently ignored |
The variance-covariance matrix is obtained by the inversion of the
negative Hessian matrix. Depending on the distribution and the
'hessianType' option, the analytical/numeric Hessian or the bhhh
Hessian is evaluated.
The argument extraPar, is currently available only for objects of class
'sfacross' and 'sfaselectioncross'. When
'extraPar = TRUE', the variance-covariance of the additional
parameters is obtained using the delta method.
The variance-covariance matrix of the maximum likelihood coefficients is returned.
sfacross, for the stochastic frontier analysis model
fitting function using cross-sectional or pooled data.
sfalcmcross, for the latent class stochastic frontier analysis
model fitting function using cross-sectional or pooled data.
sfaselectioncross for sample selection in stochastic frontier
model fitting function using cross-sectional data.
## Using data on Spanish dairy farms
# Cobb Douglas (production function) half normal distribution
cb_s_h <- sfacross(formula = YIT ~ X1 + X2 + X3 + X4, udist = 'hnormal',
data = dairyspain, S = 1, method = 'bfgs')
vcov(cb_s_h)
vcov(cb_s_h, extraPar = TRUE)
# Other variance-covariance matrices can be obtained using the sandwich package
# Robust variance-covariance matrix
requireNamespace('sandwich', quietly = TRUE)
sandwich::vcovCL(cb_s_h)
# Coefficients and standard errors can be obtained using lmtest package
requireNamespace('lmtest', quietly = TRUE)
lmtest::coeftest(cb_s_h, vcov. = sandwich::vcovCL)
# Clustered standard errors
lmtest::coeftest(cb_s_h, vcov. = sandwich::vcovCL, cluster = ~ FARM)
# Doubly clustered standard errors
lmtest::coeftest(cb_s_h, vcov. = sandwich::vcovCL, cluster = ~ FARM + YEAR)
# BHHH standard errors
lmtest::coeftest(cb_s_h, vcov. = sandwich::vcovOPG)
# Adjusted BHHH standard errors
lmtest::coeftest(cb_s_h, vcov. = sandwich::vcovOPG, adjust = TRUE)
## Using data on eighty-two countries production (GDP)
# LCM Cobb Douglas (production function) half normal distribution
cb_2c_h <- sfalcmcross(formula = ly ~ lk + ll + yr, udist = 'hnormal',
data = worldprod, uhet = ~ initStat, S = 1)
vcov(cb_2c_h)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.