Announcement

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

  • DEA -- file /dea.log could not be opened r(603);

    I wonder if you could help me with this issue.
    I just installed the user-made stata program called DEA. I already talked with the developer of this program and he is very helpful.
    However, I have this issue that I also need your help.
    After entering the correct command for DEA, I was prompted by r(603) error that file/dea.log could not be opened. I am using Stata 12 SE on Macbook OS X Mavericks.
    Here is screen details.

    use "/Applications/Stata/cooper_table3.7.dta"

    . dea i_employee= o_sales
    -------------------------------------------------------------------------
    file /dea.log could not be opened
    r(603);

    Can you please help me figure out what is this file/dea.log? I look for this file and I could not find it in my directory. It says file is not found.
    Any help from stata programers will be appreciated. I am relatively new to stata.
    Thank you once again.

    Bong C
    Philippines

  • #2
    To increase the chances of getting a good reply, please read the Statalist FAQ before posting. In your case, you should pay special attention to #12 which says
    If you are using user-written commands, explain that and say where where they came from.

    Comment


    • #3
      I haven't used dea, but it appears that it is trying to save the file /dea.log. It makes sense that this would fail, since on OS X, the directory / is owned by root. Try changing your working directory in Stata (using cd) to somewhere else where you have write access (e.g., your home directory), and then run the dea command again.

      Comment


      • #4
        The dea command is from the Stata Journal (http://www.stata-journal.com/article...article=st0193), as you are asked to explain.

        A glance at the code shows that the line concerned is

        Code:
         
        log using "dea.log", replace text name(dealog)
        which is trying to create a log file on your behalf.

        Code:
         
        . error 603
        file could not be opened
        Do you have write permission in the folder in which you are trying to run the analysis?

        Note that "Bong C.", unless you tell us otherwise, does not sound like your full real name.


        Comment


        • #5
          Thank you so much for your help.
          I change the working directory to somewhere else in my home directory and it all worked out.
          Thank you Nick and Phil.

          For Nick, thank you for explaining that the dea program came from the stata journal on the above link. Yes, Bong C is not my real name. C stands for the first letter of my surname which is Cabanda. Sorry for the confusion. I was just in a hurry to post a query here and did not read carefully the rules. I appreciate you calling my attention.

          For Dirk, thank you also for calling my attention. I will read carefully the FAQ and be too specific on my next posts.

          Again thank you so much for your assistance.

          Comment


          • #6
            Do contact the administrators to register your full name. See "Contact us" on the home page.

            Comment


            • #7
              Hello everyone. Am new on the forum. I have a data set of 11yrs, 6 DMUs ( 6 Nigerian seaports) and 4 variables that seek to measure port performance and efficiency of Nigerian seaports. It is my PhD thesis. I would like to do this using Data Envelopment Analysis ( about 10 Data Envelopment Analysis models), Free Disposal Hull and Stochastic Frontier Analysis. Then comparing the results of the three tools of analysis to know why DEA is more frequently used in measuring port efficiency. I do not have the stata software and do not know how to use it.

              Comment


              • #8
                You may wish to download a 30 day demo copy of Stata and see if it meets your needs: http://www.stata.com/customer-service/evaluate-stata/

                If there is no way you can purchase Stata, you may have better luck posting on a forum that deals with whatever software you do have.

                Also, check out the article that Nick linked to above to see if Stata can help you in this area. I've never heard of DEA before but that doesn't mean Stata doesn't have good software for it.
                -------------------------------------------
                Richard Williams
                Professor Emeritus of Sociology
                University of Notre Dame
                StataNow Version: 19.5 MP (2 processor)

                EMAIL: [email protected]
                WWW: https://academicweb.nd.edu/~rwilliam/

                Comment


                • #9
                  Thank you Richard, I have filled up for the demo copy. And i will explore the other avenue suggested as i have the DEA Excel Solver by Prof. Joe Zhu but i keep getting 'Hidden Error in Module:DEA' message. I have written the professor severally without any response from him.

                  Comment


                  • #10
                    A follow-up for readers who find this thread. The original dea command tried to create a log file named dea.log in Stata's working directory. In post #1, /dea.log shows that Stata was trying to write to the root directory (/). The r(603) error occurred when Stata could not open that file for writing. As Bong confirmed in post #5, changing to a writable folder solved it. If you are still using the original command on Stata 12, change to an existing folder where you can write files and rerun your DEA command with your data loaded.

                    Code:
                    pwd
                    cd "/path/to/your/writable/project"
                    dea i_employee = o_sales
                    The current dea v2 command runs on Stata 16 or later and no longer opens dea.log automatically. You can try the current development version on GitHub. Choose Code > Download ZIP, extract it, and keep all the files in its ado folder together. https://github.com/renegade68/DEA-Stata

                    Start a fresh Stata session and replace the example path below with the location of the extracted ado folder. Check that which dea displays dea.ado from that folder. The example uses Stata's bundled automobile dataset, so sysuse auto loads the data directly. https://www.stata.com/links/stata-ba...mple-datasets/

                    Code:
                    adopath ++ "/path/to/DEA-Stata-main/ado"
                    which dea
                    sysuse auto, clear
                    dea weight = mpg, dmu(make) rts(crs) generate(eff)
                    dea mpg, inputs(weight) dmu(make) rts(crs) generate(eff_alt)
                    assert !missing(eff, eff_alt) & abs(eff - eff_alt) < 1e-8
                    list make eff eff_alt in 1/5, noobs
                    In dea v2, you can specify the input before the equals sign or put the output first and specify the input in inputs(). Both forms here use vehicle weight as the input, mileage (mpg) as the output, and make as the vehicle identifier. The example checks that both forms give the same efficiency scores and lists the first five pairs.

                    For a packaged release, download DEA v2.0 from SourceForge and follow the same steps using the extracted folder that contains dea.ado. https://sourceforge.net/projects/deas/files/

                    Comment

                    Working...
                    X