sfm: sfm

View source: R/sfm.R

sfmR Documentation

sfm

Description

Cross-sectional stochastic frontier models are estimated with the sfm() call. For panel models, see the psfm() call.

Usage

sfm(formula, model_name = c("NHN", "NHN_Z", "NE", "NE_Z", "THT", "NTN", "NR"), data, maxit.bobyqa = 10000, maxit.psoptim = 1000, maxit.optim = 1000, REPORT = 1, trace = 2, pgtol = 0, start_val = FALSE, PSopt = FALSE, bob = TRUE, optHessian = TRUE, inefdec = TRUE, upper = NA, Method = "L-BFGS-B")

Arguments

formula

a symbolic description for the model to be estimated

model_name

model name for the estimation includes the: normal-half normal (NHN), normal-exponential (NE), student's t-half t (THT), Normal-Rayleigh (NR), and the normal-truncated normal (NTN).

data

A data set

maxit.bobyqa

Maximum number of iterations for the bobyqa optimization routine

maxit.psoptim

Maximum number of iterations for the psoptim optimization routine

maxit.optim

Maximum number of iterations for the optim optimization routine

REPORT

reporting parameter

trace

trace

pgtol

pgtol

start_val

starting value (optional)

PSopt

use psoptim optimization routine (T/F)

bob

use bobyqa optimization routine (T/F)

optHessian

Logical. Should a numerically differentiated Hessian matrix be returned? (for optim routine)

inefdec

Production or cost function

upper

Vector of upper values for the optim package.

Method

The method to be used for optim. See ‘Details’ within optim.

Note

The options include the normal-half normal (NHN), Normal-exponential (NE), student's t-half t (THT), and the normal-truncated normal (NTN). NHN_Z and NE_Z are extensions for the NHN and NE models that allow for modeling the u-component of those models with determinants of inefficiency.

Outputs include E[exp(-u)|e] given by exp_u_hat, following Battese and Coelli (1988, JoE), where appropriate.

Author(s)

David Bernstein

References

NA

Examples

cs_data_trial   <- data_gen_cs(N= 1000, rand   = 1,  sig_u  = 0.3, sig_v  = 0.3, cons   = 0.5,       beta1  = 0.5,   beta2  = 0.5, a      = 4,
mu     = 1)

cs.nhnz     <-  sfm(formula    = y_pcs_z ~ x1 +x2| z,    model_name = "NHN",                  
                    data       = cs_data_trial,          PSopt      = TRUE)

cs.nez      <-  sfm(formula    = y_pcs_z ~ x1 +x2| z,    model_name = "NE",                 
                    data       = cs_data_trial,          PSopt      = TRUE)

cs.nhn       <- sfm(formula    = y_pcs ~ x1 +x2,         model_name = "NHN", 
                    data       = cs_data_trial,          PSopt      = TRUE)

cs.ne        <- sfm(formula    = y_pcs_e ~ x1 +x2,       model_name = "NE", 
                    data       = cs_data_trial)


davidhbernstein/sfm documentation built on Feb. 28, 2025, 1:17 a.m.