Description Usage Arguments Details References Examples
spfrontier
estimates spatial specifications of
the stochastic frontier model.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
formula |
an object of class " |
data |
data frame, containing the variables in the model |
W_y |
a spatial weight matrix for spatial lag of the dependent variable |
W_v |
a spatial weight matrix for spatial lag of the symmetric error term |
W_u |
a spatial weight matrix for spatial lag of the inefficiency error term |
inefficiency |
sets the distribution for inefficiency error component. Possible values are 'half-normal' (for half-normal distribution) and 'truncated' (for truncated normal distribution). By default set to 'half-normal'. See references for explanations |
initialValues |
an optional vector of initial values, used by maximum likelihood estimator. If not defined, estimator-specific method of initial values estimation is used. |
logging |
an optional level of logging. Possible values are 'quiet','warn','info','debug'. By default set to quiet. |
control |
an optional list of control parameters,
passed to |
onlyCoef |
allows calculating only estimates for coefficients (with inefficiencies and other additional statistics). Developed generally for testing, to speed up the process. |
costFrontier |
is designed for selection of cost or production frontier |
Models for estimation are specified symbolically, but without any spatial components.
Spatial components are included implicitly on the base of the model
argument.
Kumbhakar, S.C. and Lovell, C.A.K (2000), Stochastic Frontier Analysis, Cambridge University Press, U.K.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data( airports )
airports2011 <- subset(airports, Year==2011)
W <- constructW(cbind(airports2011$longitude, airports2011$latitude),airports2011$ICAO)
formula <- log(PAX) ~ log(Population100km) + log(Routes) + log(GDPpc)
ols <- lm(formula , data=airports2011)
summary(ols )
plot(density(stats::residuals(ols)))
skewness(stats::residuals(ols))
# Takes >5 sec, see demo for more examples
# model <- spfrontier(formula , data=airports2011)
# summary(model )
# model <- spfrontier(formula , data=airports2011, W_y=W)
# summary(model )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.