Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • DEA Package Install Problem

    Hello,

    I am trying to install Data Envelopment Analysis (DEA) package in Stata 17, but I have encountered several problems.
    1. I ran ssc install dea and ssc search dea, but I did not find an official dea package in ssc.
    2. I found the dea package here: https://sourceforge.net/p/deas/code/HEAD/tree/trunk/
    3. I downloaded dea.ado file and extracted the files to my local directory as C/ado/plus
    4. Then, I tried installing with ado file in stata: do dea.ado, but it gives error while uploading the package as:
    5. variable i undeclared
    6. (344 lines skipped)
    7. end of do-file

      r(3000);
    8. Then, I tried to declare variable i as in mata: real scalar i
      command real is unrecognized
      r(199); or when I run:
    9. real scalar x
      nothing found where '(' expected
    10. I am using Stata 17 (64-bit Windows). I verified my Stata installation with about and there is no issue.
    How can I install DEA package properly from SourceForge or any other source, could you help me?

  • #2
    Actually you have installed dea successfully if you put it into C/ado/plus/d.
    1. dea is not stored in SSC, and SSC has no search subcommand. So neither ssc install dea nor ssc search dea could get what you want.
    2. As you have downloaded dea.ado and put it into C/ado/plus/d, you will run it successfully.
    3. You should download dea.sthlp and also put it into C/ado/plus/d, then just type help dea in your Stata command window.
    4. You need not to do dea.ado

    Comment


    • #3
      #4 was a misunderstanding and #5 to #9 were also misunderstandings.

      I have never used dea or tried to install it, but your link shows several files and my best guess is that you need to install all the files. If you did that, good.

      That done, your next step should be to type

      Code:
      help dea
      to find out how to use the command. The way to use the command is never to type

      Code:
      do dea
      expecting (perhaps) that you will get a series of prompts. That is not the way that Stata commands are written to be used; in principle they might be, but I can think of any.

      Comment


      • #4
        I put dea.ado and dea.sthpl into the file C/ado/plus/d, then I run the command:

        dea mr_scans total_applications
        struct BoundCond undefined
        (129 lines skipped)
        (error occurred while loading dea.ado)
        r(3000);

        . dea mr_scans total_applications, returns_to_scale(vrs) orientation(input)
        program mkDmuMat already defined
        (error occurred while loading dea.ado)
        r(110);

        I still face the problem about installing.

        Comment


        • #5
          I also run the command do dea.ado, while it was loading it gave the error in below line:
          > maxindex(VM[2,], 1, mi, mw)
          > LPRSLT[1] = VM[2, mi[1]]
          > for(i=1; i <= rows(mi); i++) {
          > LPRSLT[1+mi[i]] = 1
          > }
          > FDHRSLT = FDHRSLT \ LPRSLT
          > }
          > }
          >
          > return(FDHRSLT)
          > }
          variable i undeclared
          (344 lines skipped)
          ------------------------------------------------------------------------------------------------------------------
          r(3000);

          end of do-file

          r(3000);

          Comment


          • #6
            Here is the authors' instruction of installation: https://sourceforge.net/p/deas/discu...read/737d0d22/

            Comment


            • #7
              Thank you, I uploaded package properly with that instruction.

              Comment


              • #8
                Thanks for confirming in post #7 that the installation worked. For anyone following this thread, the SourceForge package is called deas. Once installed, you type dea in Stata. You can skip the step where you ran do dea.ado or tried to declare the Mata variable yourself.

                SourceForge now distributes dea 2.0.73 (Stata 16 or later). For a fresh installation, run these commands in Stata.

                Code:
                net install deas, from("https://downloads.sourceforge.net/project/deas")
                which dea, all
                help dea
                The current ZIP is available from SourceForge Files, and the source code is on GitHub.

                If you specifically need the archived 2.0.29 release, download deas_v2_0_stata_package.zip from the v2.0 folder and extract it. In the command below, use the full path to the folder containing deas.pkg and stata.toc. The all option also copies the accompanying examples.

                Code:
                net install deas, from("C:/Downloads/deas_v2_0_stata_package") all
                which dea, all
                If Stata lists several copies, the first path shows which dea.ado it will use.

                To check the installation, run this whole block in the Do-file Editor. It uses Stata's built-in automobile data. Each car model is one DMU, with price as the input and miles per gallon as the output.

                Code:
                preserve
                sysuse auto, clear
                dea price = mpg, dmu(make) rts(vrs) orientation(input) generate(eff)
                list make eff if abs(eff - 1) < 1e-7, noobs
                restore
                With this specification, four of the 74 models score 1: Chev. Chevette, Merc. Zephyr, Subaru, and VW Diesel. The final restore brings back the data you had in memory.

                For a related discussion of computation time, see DEA for 9040 firms. The original poster wanted efficiency scores for 9,040 firms with five inputs and two outputs.

                For a cross-section of that size, sdea can reduce computation time by scoring every firm against a smaller set of reference firms. Its README includes a reproducible example with 9,040 simulated firms and a separate streaming example that updates the frontier as observations arrive. It also links to the required DEA-Stata version. sdea installation and examples

                Comment

                Working...
                X