Learn R Programming

frontier (version 1.1-8)

cooks.distance.frontier: Pseudo-Cook's Distance of Stochastic Frontier Models

Description

This method returns the Pseudo-Cook's distances from stochastic frontier models estimated with the frontier package (e.g., function sfa).

Usage

# S3 method for frontier
cooks.distance( model, target = "predict",
   asInData = FALSE, progressBar = TRUE, … )

Arguments

model

a stochastic frontier model estimated with the frontier package (e.g. function sfa).

target

character string. If "predict", the returned values indicate the influence of individual observations on the predicted values; if "efficiencies", the returned values indicate the influence of individual observations on the efficiency estimates.

asInData

logical. If FALSE, the returned vector only includes observations that were used in the estimation; if TRUE, the length of the returned vector is equal to the total number of observations in the data set, where the values in the returned vector that correspond to observations that were not used in the estimation due to NA or infinite values are set to NA.

progressBar

logical. Should a progress bar be displayed while the Cook's distances are obtained?

additional arguments that arecurrently ignored if argument target is "predict" and that are passed to the efficiencies() method if argument target is "efficiencies".

Value

A vector of the Pseudo-Cook's distances for each observation that was used in the estimation that is provided as argument model.

See Also

sfa, cooks.distance.

Examples

Run this code
# NOT RUN {
   # example included in FRONTIER 4.1 (cross-section data)
   data( front41Data )

   # Cobb-Douglas production frontier
   cobbDouglas <- sfa( log( output ) ~ log( capital ) + log( labour ),
      data = front41Data )
   summary( cobbDouglas )
   
   # Pseudo-Cook's distances for predicted values
   cooks.distance( cobbDouglas )

   # Pseudo-Cook's distances for efficiency estimates
   cooks.distance( cobbDouglas, "efficiencies" )
# }

Run the code above in your browser using DataLab