Announcement

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

  • R(504) Matrix has missing values using DEA in STATA

    HI Everyone,
    I am using data with 28 DMUS for 16 years, therefore, 473 observations. I have 4 outputs and 3 inputs. My purpose is calculate technical efficiency using DEA proceadure. I've use the following stata command:
    "dea i_1 i_2 i_3 = o_1 o_2 o_3 o_4, ort(out)"
    Here we have the first problem, Stata does not calculate and has the following error:
    "matsize too small to create a [473,3] matrix r(908)"
    One way to solve this problem is setting matsize, I always select 500 matsize with the following stata command
    "set matsize 500" and come to try with the previous stata command
    "dea i_1 i_2 i_3 = o_1 o_2 o_3 o_4 , ort(out)"
    After wait more than 48 hours, stata report me the following error
    "Matrix has missing value r(504)"
    I've checked panel data carefully and I dont have missing values.


    Variable Obs Mean Std. Dev. Min Max

    i_1 473 10171.24 6514.578 1535 28910
    i_2 473 2929735 2541250 240671 1.11e+07
    i_3 473 198.3827 111.5396 43 578
    o_1 473 5071213 1.20e+07 2 6.06e+07
    o_2 473 5498762 7649714 2 3.18e+07
    o_3 473 973899.1 1703909 2 8942434
    o_4 473 6066606 4587620 430218 2.03e+07

    Lastly, I checked using codebook comand "codebook i_1 i_2 i_3 o_1 o_2 o_3 o_4" and none variable had missing values.


    Have someone experience in the same problem? Can someone help me?
    Thank everybody.
    Regards,
    José Cano.

  • #2
    The error message you got is probably not due to a missing value in your data, but rather to an unexpected situation in the code which created a missing value where none is expected, and then tripped over it when it later tried to use it.

    The dea and malmq command often arise together in Statalist discussion, and they are both problematic because their authors do not keep them updated in places most users would look for them.

    https://www.statalist.org/forums/for...ivity-analysis

    In post #5 and the following posts of the topic linked to above you will see a discussion of what (as of May 2019) I believed to be the most recent version of dea available, which identifies itself (using the Stata command
    Code:
    which dea
    as "*! version 1.2.1 09FEB2014". Does this correspond to the version you are using? If you have an earlier version, perhaps this version will not have the same problem. If you have a later version, can you tell us where to find it on the web?

    Comment


    • #3
      Thanks for reply William.
      First, I'uve used option emptycells, because the default option is to keep emptycells and maybe dropping emptycells I can obtain DEA results.
      Code:
      set emptycells
      Using emptycells option, DEA does not report the error r(908) "matsize too small to create a [473,3] matrix ".
      Finally, when I use the code "which dea" in Stata, the program tell me the follow information : "version 1.0.1 12DEC2009". Maybe it is very old version. Do you know how I can to update to the most recent version?
      I will inform you of thw news.
      Regards,
      José Cano.

      Comment


      • #4
        Hello,
        to resolve this problem you have to delete the output observations that contain 0. in other words, you may use this command: delete if output_variable ==0

        Comment

        Working...
        X