residuals.frontier: Returning Residuals

Description Usage Arguments Value Author(s) See Also Examples

View source: R/residuals.frontier.R

Description

This method returns the residuals from stochastic frontier models estimated with the frontier package (e.g. function sfa).

Usage

1
2
## S3 method for class 'frontier'
residuals( object, asInData = FALSE, ... )

Arguments

object

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

asInData

logical. If TRUE, the residuals are returned in the same order as the corresponding observations in the data set used for the estimation (see section ‘value’ below).

...

currently ignored.

Value

If argument asInData is FALSE (default), a matrix of the residuals is returned, where each row corresponds to a firm (cross-section unit) and each column corresponds to a time period.

If argument asInData is TRUE, a vector of residuals is returned, where the residuals are in the same order as the corresponding observations in the data set used for the estimation.

Author(s)

Arne Henningsen

See Also

sfa, residuals.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
   # rice producers in the Philippines (panel data)
   data( "riceProdPhil" )
   library( "plm" )
   riceProdPhil <- pdata.frame( riceProdPhil, c( "FMERCODE", "YEARDUM" ) )

   # Error Components Frontier (Battese & Coelli 1992), no time effect
   rice <- sfa( log( PROD ) ~ log( AREA ) + log( LABOR ) + log( NPK ),
      data = riceProdPhil )
   residuals( rice )
   riceProdPhil$residuals <- residuals( rice, asInData = TRUE )

   # Error Components Frontier (Battese & Coelli 1992), with time effect
   riceTime <- sfa( log( PROD ) ~ log( AREA ) + log( LABOR ) + log( NPK ),
      data = riceProdPhil, timeEffect = TRUE )
   residuals( riceTime )
   riceProdPhil$residualsTime <- residuals( riceTime, asInData = TRUE )

Example output

Loading required package: micEcon

If you have questions, suggestions, or comments regarding one of the 'micEcon' packages, please use a forum or 'tracker' at micEcon's R-Forge site:
https://r-forge.r-project.org/projects/micecon/
Loading required package: lmtest
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric


Please cite the 'frontier' package as:
Tim Coelli and Arne Henningsen (2013). frontier: Stochastic Frontier Analysis. R package version 1.1. http://CRAN.R-Project.org/package=frontier.

If you have questions, suggestions, or comments regarding the 'frontier' package, please use a forum or 'tracker' at frontier's R-Forge site:
https://r-forge.r-project.org/projects/frontier/
Loading required package: Formula
             1             2             3           4             5
1  -0.20278949 -0.3304556662 -0.1641162183 -0.31908854 -0.3260686490
2  -0.24401641 -0.1123533357 -0.0433890769  0.16451064  0.1190193351
3  -0.16475785 -0.3131695209 -0.3009807253 -0.44384183 -0.6788007657
4   0.01638506 -0.3743895693  0.3904049111  0.04721881 -0.0350207315
5  -0.12751503 -0.1927512162 -0.1185361001 -0.05281794 -0.3363256886
6   0.04494011 -0.3950180192 -0.1310805358 -0.40217179 -0.2140579871
7   0.02101399  0.1160277250  0.0272000403  0.15230727 -0.0944657259
8  -0.02647454 -0.0695508506 -0.4258926314 -0.12846580 -0.1464352456
9  -0.15731248 -0.0210233929 -0.0638669107 -0.20426780 -0.1719623228
10 -0.27318305 -0.3391942768  0.0005006776  0.02812090 -0.5950435676
11 -0.95868483 -0.8981000477 -0.5380128445 -0.28389270 -0.6724019076
12  0.09624400 -0.1040226497 -0.1247559765  0.39391340 -0.2657044312
13 -0.12497977 -0.4562064770 -0.1438980927 -0.39136616 -0.5763875891
14 -0.23160441 -0.3663751907 -0.2226933618 -0.08623010 -0.0876328273
15 -0.27217667 -0.2908233827 -0.4635016817 -0.15859991 -0.1837984465
16 -0.67612545  0.0022103108 -0.1448507878 -0.05983167  0.0542942119
17 -0.33668681 -0.9666326465 -0.0265734927  0.21755198  0.3246349917
18  0.05644925 -0.0955554437  0.0273802734 -0.02948628 -0.0495602515
19  0.01565534  0.1647428446 -0.0258430413 -0.84448834 -0.0692439440
20 -0.07733579  0.0003603225  0.0111445643 -0.09298539 -0.0451311763
21 -0.50601110 -0.6826260682  0.0535812960 -0.66573110 -0.2328880530
22  0.04193542 -0.2248071612  0.0723475591  0.11854696 -0.5697993342
23 -0.58073850 -0.3778590255 -0.1395339411 -0.75312027 -0.2167934305
24 -0.22433212 -0.3419956683  0.0177145828 -0.14603726 -0.8910289694
25 -0.25894193 -0.0573181809 -0.0356349632  0.02705360 -0.7039973263
26 -0.24473852 -0.4671160421 -0.0503634983 -0.38393304 -0.0009236725
27 -0.61591913 -0.1623220709 -0.0613417621 -0.27445067 -0.4403890656
28  0.02359888  0.1362368141  0.1472801727 -0.05191063 -0.0107064276
29 -0.28466590 -0.5585283730 -0.3009764353  0.08253498 -0.6066398163
30 -0.52673457 -0.3319389158 -0.3991243912 -0.19260998 -0.2519612761
31  0.38343817 -0.4159418538  0.1182230474 -0.26060830  0.0308052547
32 -0.81918529 -0.1881888855  0.0498994893 -0.01095017 -0.1978790060
33 -0.16665980 -0.1863728877 -0.1844929170 -0.08405816  0.0657820344
34 -1.20454904 -1.1999563089 -0.7336921985 -0.38200272 -1.0487949330
35  0.05092456  0.0896587282  0.0093171902 -0.06942853 -0.4413206934
36 -0.91652298 -0.4018745802 -0.3127685163 -0.43344922 -0.4265906424
37  0.14795168  0.1228012438  0.2052944010  0.13449830 -0.1397978438
38  0.12780203 -0.0880514180  0.0210041711  0.01529079 -0.4408454789
39 -0.64967954 -0.9316459379 -0.3894714686 -0.15729124  0.1384666251
40 -0.57669800 -0.7027856968 -0.4359526180 -0.39673302 -0.3798257371
41 -0.12796995  0.1502057836  0.1330432550  0.04964648 -0.3693082761
42  0.28713693  0.0928724053  0.0413856807 -0.17712236 -0.3568291913
43 -1.09496783 -1.1730240095 -0.3490654080 -0.46045907 -0.1116524453
              6           7            8
1  -0.681437139 -0.78350342 -0.051989934
2   0.155057702 -0.18728226  0.303912362
3  -0.037014120 -0.86648760 -0.044576335
4  -0.208589049 -0.21627197 -0.167858833
5  -0.170294065 -0.21564532 -0.005545321
6  -0.116552026 -0.50949931 -0.232821364
7  -0.182339350 -0.27271719  0.096375151
8  -0.411762570 -0.60553048 -0.060901950
9  -0.333340490 -0.17072151  0.016496100
10  0.039317780 -0.28589831  0.055423491
11 -0.205827847 -0.89033043 -0.237383873
12  0.242113612  0.15238294  0.348066168
13 -0.271419533 -0.24390679 -0.071206301
14 -0.136957012  0.05182397 -0.055279095
15 -0.159307138 -1.11408720 -0.503956943
16  0.124712623  0.09114858  0.080432673
17  0.206471738 -0.49860952  0.074826556
18 -0.062579575 -0.14962786  0.185210614
19  0.070332973 -0.95591156  0.340188328
20 -0.163504819 -0.23714768  0.052651374
21  0.148297046  0.03492371 -0.191466058
22 -0.494443149 -0.47201863 -0.186470286
23 -0.177840427 -0.80054555 -0.154685210
24 -0.239943499 -0.62961469 -0.754679913
25 -0.430814111 -0.32172813  0.176181889
26 -0.018893265 -0.21815415  0.039007016
27 -0.066193498 -0.50696546  0.070332429
28 -0.079332900  0.02221047  0.121709565
29 -1.086787638 -0.41244635 -0.044030799
30 -0.310719267 -0.45940980 -2.130980524
31  0.145551423 -0.80166732  0.474803680
32 -0.630299326 -0.34155740  0.682300936
33 -0.003863925 -0.47906297  0.178845310
34 -0.557448633 -0.65767038 -0.642084821
35 -0.228223101 -0.05021110  0.164097279
36 -0.321739955 -0.58287799  0.031285286
37 -0.084026552 -0.32260784 -0.109405826
38  0.119720107 -0.05256905  0.448091188
39  0.019905206 -0.48054290 -0.316085946
40 -0.391960866 -0.74489743 -0.092278498
41  0.289048162 -0.22050955  0.334392862
42 -0.210571376 -0.33667551  0.008309323
43  0.201449646 -0.20421689  0.206689497
              1            2            3            4            5           6
1  -0.207246278 -0.323262141 -0.151344659 -0.307193380 -0.315695861 -0.68292686
2  -0.248088201 -0.125098992 -0.041618230  0.165680575  0.134509311  0.13827300
3  -0.170829486 -0.306647892 -0.310384559 -0.452381378 -0.688103553 -0.02486342
4   0.009656525 -0.398503732  0.371746581  0.033367585 -0.049200685 -0.20979968
5  -0.146397556 -0.204708068 -0.131218058 -0.063691405 -0.345469941 -0.19221707
6   0.027361747 -0.404852608 -0.122302707 -0.407414769 -0.224005191 -0.11212390
7   0.034863823  0.127203272  0.048960936  0.158309919 -0.081207624 -0.17071229
8  -0.027232237 -0.065963470 -0.419352841 -0.122703955 -0.142652520 -0.39118443
9  -0.174822058 -0.033470664 -0.065106755 -0.219106986 -0.178030037 -0.34667556
10 -0.280414400 -0.337438879 -0.002636754  0.025389900 -0.590951225  0.04487223
11 -0.960670122 -0.887241414 -0.531798081 -0.311094491 -0.697620909 -0.21115603
12  0.102400966 -0.105609458 -0.098025620  0.412873757 -0.250490255  0.23018200
13 -0.139220498 -0.468594954 -0.155392167 -0.403514627 -0.568817903 -0.28518674
14 -0.251540774 -0.379542245 -0.240236289 -0.097493283 -0.098992176 -0.13854147
15 -0.258488715 -0.277856441 -0.454663472 -0.160882456 -0.185255930 -0.15603986
16 -0.676764736  0.002433730 -0.112063086 -0.067730062  0.054923927  0.10557403
17 -0.348357489 -0.973794092 -0.019411016  0.226081188  0.328921511  0.22081220
18  0.050722315 -0.097972531  0.025486919 -0.029260373 -0.052469700 -0.06039831
19 -0.001230993  0.148931070 -0.015330686 -0.846736917 -0.075039109  0.06954900
20 -0.086797159 -0.001558775  0.024123707 -0.084511491 -0.046578628 -0.15838593
21 -0.519471816 -0.680226088  0.030595898 -0.692069057 -0.258074071  0.14185515
22  0.036615665 -0.231238854  0.064797743  0.109224518 -0.567611924 -0.49310370
23 -0.584157864 -0.371739819 -0.132945595 -0.748832430 -0.214654446 -0.16891506
24 -0.229708223 -0.343925407  0.016418178 -0.175708184 -0.896161545 -0.23949714
25 -0.253678301 -0.053453355 -0.033734009  0.023756747 -0.695553406 -0.41734599
26 -0.247546416 -0.476755547 -0.048007338 -0.376671231  0.010842604 -0.00540272
27 -0.608951513 -0.165305409 -0.047782127 -0.261535703 -0.443305362 -0.04722763
28  0.026034785  0.144670770  0.146451547 -0.038574300 -0.003580078 -0.06887377
29 -0.310637833 -0.577835500 -0.330590996  0.076573317 -0.629053619 -1.08705635
30 -0.545016640 -0.342277325 -0.429700292 -0.203870868 -0.258920913 -0.31349922
31  0.376575494 -0.424403243  0.111262929 -0.267548134  0.016767491  0.15421196
32 -0.810889040 -0.182295839  0.049639067 -0.013523614 -0.193572812 -0.62231619
33 -0.174331304 -0.191611499 -0.191698033 -0.091210366  0.073436930  0.01777286
34 -1.234920674 -1.227241671 -0.762254208 -0.441877287 -1.093303610 -0.55794712
35  0.051680879  0.088772423 -0.006478970 -0.083572209 -0.432677400 -0.22528055
36 -0.912633545 -0.400952997 -0.322247271 -0.435794801 -0.436484011 -0.33213075
37  0.164097269  0.136128102  0.231124624  0.167280272 -0.147440409 -0.07343300
38  0.110911575 -0.103049085  0.016948941 -0.002376426 -0.443191222  0.13105433
39 -0.667399591 -0.944590628 -0.414354176 -0.186119481  0.130442191  0.02468633
40 -0.575716019 -0.700326034 -0.433741686 -0.397092759 -0.382980391 -0.39801047
41 -0.137808933  0.137054711  0.120045137  0.015287219 -0.399894190  0.24503398
42  0.274740357  0.084601969  0.038958474 -0.185397683 -0.362445837 -0.20680400
43 -1.103898163 -1.176697783 -0.354693905 -0.481760029 -0.127729771  0.19688997
             7            8
1  -0.76855081 -0.044402211
2  -0.17933072  0.287469195
3  -0.87719358 -0.050551154
4  -0.21047262 -0.167132324
5  -0.21899024 -0.024818526
6  -0.49737903 -0.222544838
7  -0.26474999  0.117565528
8  -0.60019284 -0.052203446
9  -0.17024012  0.009311606
10 -0.28004280  0.058642675
11 -0.89956129 -0.241001334
12  0.15462683  0.361558631
13 -0.23355639 -0.065924085
14  0.05003952 -0.053249641
15 -1.10220862 -0.500190409
16  0.07767264  0.064273731
17 -0.46723897  0.085670672
18 -0.15019297  0.179709397
19 -0.95259002  0.349439625
20 -0.22967542  0.055889978
21  0.02606992 -0.205094982
22 -0.46510544 -0.170237357
23 -0.78317145 -0.151605767
24 -0.63770918 -0.754773000
25 -0.32608429  0.166191889
26 -0.20593652  0.055709436
27 -0.48934007  0.066292595
28  0.03466527  0.135930175
29 -0.40681477 -0.037898938
30 -0.45482090 -2.131291245
31 -0.80149826  0.476839058
32 -0.32089396  0.687023755
33 -0.46777203  0.179834875
34 -0.65477467 -0.613287002
35 -0.05045589  0.163550243
36 -0.58844060  0.037076215
37 -0.33660856 -0.113933832
38 -0.04056760  0.464819618
39 -0.46877441 -0.336332968
40 -0.73847740 -0.082429300
41 -0.24695824  0.318825810
42 -0.33850908  0.012802384
43 -0.20269999  0.198841960

frontier documentation built on April 19, 2020, 3:54 p.m.