nobs | R Documentation |
This function extracts the total number of 'observations' from a fitted frontier model.
## S3 method for class 'sfacross'
nobs(object, ...)
## S3 method for class 'sfalcmcross'
nobs(object, ...)
## S3 method for class 'sfaselectioncross'
nobs(object, ...)
object |
a |
... |
Currently ignored. |
nobs
gives the number of observations actually
used by the estimation procedure. It is not necessarily the number
of observations of the model frame (number of rows in the model
frame), because sometimes the model frame is further reduced by the
estimation procedure especially in the presence of NA. In the case of
sfaselectioncross
, nobs
returns the number of observations used in the
frontier equation.
A single number, normally an integer.
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.
## Not run:
## Using data on fossil fuel fired steam electric power generation plants in the U.S.
# Translog (cost function) half normal with heteroscedasticity
tl_u_h <- sfacross(formula = log(tc/wf) ~ log(y) + I(1/2 * (log(y))^2) +
log(wl/wf) + log(wk/wf) + I(1/2 * (log(wl/wf))^2) + I(1/2 * (log(wk/wf))^2) +
I(log(wl/wf) * log(wk/wf)) + I(log(y) * log(wl/wf)) + I(log(y) * log(wk/wf)),
udist = 'hnormal', uhet = ~ regu, data = utility, S = -1, method = 'bfgs')
nobs(tl_u_h)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.