fitted {sfaR} | R Documentation |
Extract fitted values of stochastic frontier models
Description
fitted
returns the fitted frontier values from stochastic
frontier models estimated with sfacross
, sfalcmcross
,
or sfaselectioncross
.
Usage
## S3 method for class 'sfacross'
fitted(object, ...)
## S3 method for class 'sfalcmcross'
fitted(object, ...)
## S3 method for class 'sfaselectioncross'
fitted(object, ...)
Arguments
object |
A stochastic frontier model returned
by |
... |
Currently ignored. |
Value
In the case of an object of class 'sfacross'
, or
'sfaselectioncross'
, a vector of fitted values is returned.
In the case of an object of class 'sfalcmcross'
, a data frame
containing the fitted values for each class is returned where each variable
ends with '_c#'
, '#'
being the class number.
Note
The fitted values are ordered in the same way as the corresponding observations in the dataset used for the estimation.
See Also
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 or pooled data.
Examples
## Not run:
## 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)
fit.cb_2c_h <- fitted(cb_2c_h)
head(fit.cb_2c_h)
## End(Not run)