Learn R Programming

npsf (version 0.8.0)

nobs.npsf: 'nobs' method for class 'npsf'

Description

Extracts the number of observations for which efficiencies are estimated by SF or DEA model estimated by sf, teradial, tenonradial, or teradialbc.

Usage

# S3 method for npsf
nobs( object, … )

Arguments

object

an object of class npsf returned by the function sf).

currently unused.

Value

nobs.npsf returns the number of observations for which efficiencies are estimated by SF or DEA model.

See Also

vcov.npsf, coef.npsf, summary.npsf, and sf.

Examples

Run this code
# NOT RUN {
require( npsf )
 
# Load Penn World Tables 5.6 dataset
 
data( pwt56 )
head( pwt56 )
 
# Create some missing values
 
pwt56 [4, "K"] <- NA 
 
# Stochastic production frontier model with 
# homoskedastic error components (half-normal)
 
# Use subset of observations - for year 1965
 
m1 <- sf(log(Y) ~ log(L) + log(K), data = pwt56, 
 subset = year == 1965, distribution = "h")
nobs( m1 )

# DEA

t1 <- teradialbc ( Y ~ K + L, data = pwt56, subset = Nu < 10)
nobs(t1)
# }

Run the code above in your browser using DataLab