# NOT RUN {
# }
# 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 nonparametric test that radial (Debreu-Farrell)
# output-based measure of technical efficiency under assumption of
# NIRS technology and mix of outputs are independent. Test is
# performed based on 999 replications at the 5<!-- % significance level. -->
t1 <- nptestind ( y1 + y2 + y3 ~ x1 + x2 + x3 + x4 + x5,
data = ccr81, base = "o", rts = "n",
reps = 999, dots = TRUE)
# Really large data-set
data(usmanuf)
head(usmanuf)
nrow(usmanuf)
table(usmanuf$year)
# This will take some time depending on computer power
data(usmanuf)
head(usmanuf)
t2 <- nptestind ( Y ~ K + L + M, data = usmanuf,
subset = year >= 1999 & year <= 2000,
reps = 999, dots = TRUE, base = "i", rts = "v")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab