Description Usage Arguments Details Value Note Author(s) References See Also Examples

Routine `nptestrts`

performs nonparametric tests the returns to scale of the underlying technology via bootstrapping techniques.

1 2 3 4 5 6 |

`formula` |
an object of class “formula” (or one that can be coerced to that class): a symbolic description of the model. The details of model specification are given under ‘Details’. |

`data` |
an optional data frame containing the variables in the model. If not found in data, the variables are taken from environment ( |

`subset` |
an optional vector specifying a subset of observations for which technical efficiency is to be computed. |

`base` |
character or numeric. string: first letter of the word “o” for computing output-based or “i” for computing input-based technical efficiency measure. string: 2 for computing output-based or 1 for computing input-based technical efficiency measure |

`homogeneous` |
logical. If TRUE, the reference set is bootstrapped with homogeneous smoothing; if FALSE, the reference set is bootstrapped with heterogeneous smoothing. |

`test.two` |
logical. If TRUE, test 2, where efficiency measures under assumption of non-increasing and variable returns to scale technology are compared; if FALSE, |

`reps` |
specifies the number of bootstrap replications to be performed. The default is 999. The minimum is 100. Adequate estimates of confidence intervals using bias-corrected methods typically require 1,000 or more replications. |

`alpha` |
sets significance level; default is |

`core.count` |
positive integer. Number of cluster nodes. If |

`cl.type` |
Character string that specifies cluster type (see |

`dots` |
logical. Relevant if |

`print.level` |
numeric. 0 - nothing is printed; 1 - print summary of the model and data. 2 - print summary of technical efficiency measures. 3 - print estimation results observation by observation. Default is 1. |

Routine `nptestrts`

performs nonparametric tests the returns to scale of the underlying technology (see Simar L. and P.W. Wilson (2002), Nonparametric Tests of Return to Scale, *European Journal of Operational Research*, **139**, 115–132, doi: 10.1016/S0377-2217(01)00167-9).

If `test.two`

is not specified, `nptestrts`

performs only Test #1, which consists of two parts. First, the null hypothesis that the technology is globally CRS (vs VRS) is tested. Second, the null hypothesis that the data point is scale efficient is tested.

If `test.two`

is specified, `nptestrts`

may perform Test #2. If the null hypothesis that the technology is CRS is rejected, `test.two`

requests that `nptestrts`

tests the null hypothesis that the technology is NIRS (vs VRS). If not all data points are scale efficient, `nptestrts`

tests that the reason for scale inefficiency is DRS. If the null hypothesis that the technology is CRS is not rejected and all data points are scale efficient, `nptestrts`

will not perform Test #2 even if `test.two`

is specified.

Models for `nptestrts`

are specified symbolically. A typical model has the form `outputs ~ inputs`

, where `outputs`

(`inputs`

) is a series of (numeric) terms which specifies outputs (inputs). Refer to the examples.

If `core.count>=1`

, `nptestrts`

will perform bootstrap on multiple cores. Parallel computing requires package `snowFT`

. By the default cluster type is defined by option `cl.type="SOCK"`

. Specifying `cl.type="MPI"`

requires package `Rmpi`

.

On some systems, specifying option `cl.type="SOCK"`

results in much quicker execution than specifying option `cl.type="MPI"`

. Option `cl.type="SOCK"`

might be problematic on Mac system.

Parallel computing make a difference for large data sets. Specifying option `dots=TRUE`

will indicate at what speed the bootstrap actually proceeds. Specify `reps=100`

and compare two runs with option `core.count=1`

and `core.count>1`

to see if parallel computing speeds up the bootstrap. For small samples, parallel computing may actually slow down the `nptestrts`

.

Results can be summarized using `summary.npsf`

.

`nptestrts`

returns a list of class `npsf`

containing the following elements:

`K` |
numeric: number of data points. |

`M` |
numeric: number of outputs. |

`N` |
numeric: number of inputs. |

`rts` |
string: RTS assumption. |

`base` |
string: base for efficiency measurement. |

`reps` |
numeric: number of bootstrap replications. |

`alpha` |
numeric: significance level. |

`teCrs` |
numeric: measures of technical efficiency under the assumption of CRS. |

`teNrs` |
numeric: measures of technical efficiency under the assumption of NiRS. |

`teVrs` |
numeric: measures of technical efficiency under the assumption of VRS. |

`sefficiency` |
numeric: scale efficiency. |

`sefficiencyMean` |
numeric: ratio of means of technical efficiency measures under CRS and VRS. |

`pGlobalCRS` |
numeric: p-value of the test that the technology is globally CRS. |

`psefficient` |
numeric: p-value of the test that data point is statistically scale efficient. |

`sefficient` |
logical: returns |

`nsefficient` |
numeric: number of statistically scale efficient. |

`nrsOVERvrsMean` |
numeric: ratio of means of technical efficiency measures under NIRS and VRS (if |

`pGlobalNRS` |
numeric: p-value of the test the technology is globally NIRS (if |

`sineffdrs` |
logical: returns |

`pineffdrs` |
numeric: p-value of the test that data point is scale inefficient due to DRS (if |

`nrsOVERvrs` |
numeric: ratio of measures of technical efficiency under NiRS and VRS (if |

`esample` |
logical: returns TRUE if the observation in user supplied data is in the estimation subsample and FALSE otherwise. |

Before specifying option `homogeneous`

it is advised to preform the test of independence (see `nptestind`

).

Results can be summarized using `summary.npsf`

.

Oleg Badunenko <oleg.badunenko@brunel.ac.uk>, Pavlo Mozharovskyi <pavlo.mozharovskyi@telecom-paris.fr>

Badunenko, O. and Mozharovskyi, P. (2016), Nonparametric Frontier Analysis using Stata, *Stata Journal*, **16**3, 550–89, doi: 10.1177/1536867X1601600302

Färe, R. and Lovell, C. A. K. (1978), Measuring the technical efficiency of production, *Journal of Economic Theory*, **19**, 150–162, doi: 10.1016/0022-0531(78)90060-1

Färe, R., Grosskopf, S. and Lovell, C. A. K. (1994), *Production Frontiers*, Cambridge U.K.: Cambridge University Press, doi: 10.1017/CBO9780511551710

Simar L. and P.W. Wilson (2002), Nonparametric Tests of Return to Scale, *European Journal of Operational Research*, **139**, 115–132, doi: 10.1016/S0377-2217(01)00167-9

`teradial`

, `tenonradial`

, `teradialbc`

, `tenonradialbc`

, `nptestind`

, `sf`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | ```
## Not run:
require( npsf )
# Prepare data and matrices
data( ccr81 )
head( ccr81 )
# Create some missing values
ccr81 [64, "x4"] <- NA # just to create missing
ccr81 [68, "y2"] <- NA # just to create missing
Y2 <- as.matrix( ccr81[ , c("y1", "y2", "y3"), drop = FALSE] )
X2 <- as.matrix( ccr81[ , c("x1", "x2", "x3", "x4", "x5"), drop = FALSE] )
# Perform output-based test of returns to scale smoothed
# homogeneous bootstrap with 999 replications at the 5
# significance level. Also perform Test #2
t1 <- nptestrts(y1 + y2 + y3 ~ x1 + x2 + x3 + x4 + x5,
data = ccr81, homogeneous = TRUE,
reps = 999, dots = TRUE, base = "o")
# suppress printing replication dots
t2 <- nptestrts(Y2 ~ X2,
homogeneous = TRUE,
reps = 100, dots = FALSE, base = "o")
# heterogeneous
t3 <- nptestrts(Y2 ~ X2,
homogeneous = FALSE,
reps = 100, dots = TRUE, base = "o")
# ===========================
# === Parallel computing ===
# ===========================
# Perform previous test but use 8 cores and
# cluster type SOCK
t3 <- nptestrts(y1 + y2 + y3 ~ x1 + x2 + x3 + x4 + x5,
data = ccr81, homogeneous = FALSE,
reps = 100, dots = TRUE, base = "o",
core.count = 8, cl.type = "SOCK")
# Really large data-set
data(usmanuf)
head(usmanuf)
nrow(usmanuf)
table(usmanuf$year)
# Figure industries to include in the sample (first quarter)
summary(usmanuf[usmanuf$year >= 1999 & usmanuf$year < 2000, "naics"])
# This test is quite demanding and it will take some time
# depending on computer power
t4 <- nptestrts(Y ~ K + L + M, data = usmanuf,
subset = year >= 1999 & year < 2000 & naics < 321900,
homogeneous = FALSE, reps = 100, dots = TRUE, base = "o",
core.count = 8, cl.type = "SOCK")
# This is very computer intensive task
t5 <- nptestrts(Y ~ K + L + M, data = usmanuf,
subset = year >= 1999 & year < 2000,
homogeneous = FALSE, reps = 100, dots = TRUE, base = "o",
core.count = 8, cl.type = "SOCK")
## End(Not run)
``` |

npsf documentation built on Nov. 23, 2020, 1:07 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.