Announcement

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

  • Problem with xtoprobit

    Hi,

    I have a problem. I have a panel, my dependent variable is between 0 and 21 (and these values are rank-ordered), I have a exogenous variable between 0 and 21 and additionally the squared version of the exogenous variable.
    I tried xtoprobit y x x^2, vce(robust)

    and got the following error:
    1)
    J(): 3900 unable to allocate real <tmp>[3422514,3240]
    _gsem_eval_ordinal(): - function returned error
    _gsem_eval_iid__obs(): - function returned error
    _gsem_eval_iid__wrk(): - function returned error
    _gsem_eval_iid(): - function returned error
    mopt__calluser_v(): - function returned error
    opt__eval_nr_v2(): - function returned error
    opt__eval(): - function returned error
    opt__looputil_iter0_common(): - function returned error
    opt__looputil_iter0_nr(): - function returned error
    opt__loop_nr(): - function returned error
    _moptimize(): - function returned error
    _gsem_build__start_fixed(): - function returned error
    _gsem_build__start(): - function returned error
    _gsem_build(): - function returned error
    _gsem_parse(): - function returned error
    st_gsem_parse(): - function returned error
    <istmt>: - function returned error


    2) Question: Is it possible to have FE instead of RE in xtoprobit?


    Many Thanks,
    Barc

  • #2
    This Mata run-time error is usually caused by xtoprobit's intermediate analytical
    calculations for computing the Hessian matrix.

    Although not documented, xtoprobit allows the dnumerical option, which
    causes xtoprobit to use numerical derivatives. The memory requirements for
    the numerical derivatives are much less, but at the cost of time.

    Is it possible to have FE instead of RE in xtoprobit?
    Outside of using factor variables with oprobit, I am not aware of an FE model
    for ordinal probit regression.

    Comment


    • #3
      Also, do you really need 22 unique values for the dependent variable? Would it be reasonable to combine some? In fact, if they are more or less evenly spaced, it may not be so bad to use xtreg instead.
      -------------------------------------------
      Richard Williams, Notre Dame Dept of Sociology
      Stata Version: 17.0 MP (2 processor)

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

      Comment


      • #4
        ok, I tried to use a variable between 0 and 3 (integers only of course) for the dependent variable. I still get that result. My independent variables are not integers, may that cause problems?

        I used xtreg but there are to many observations on the right tail, causing xtreg to underestimate the effect.
        Last edited by Barc; 08 Aug 2014, 02:49.

        Comment


        • #5
          Sometimes rescaling can help, such as when a squared term results in huge numbers. E.g. Measure income in thousands of dollars rather than dollars. Also, try starting with a very simple model and gradually add more variables. Maybe you can identify a variable that is causing all the problems.
          -------------------------------------------
          Richard Williams, Notre Dame Dept of Sociology
          Stata Version: 17.0 MP (2 processor)

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

          Comment


          • #6
            Ok I followed your advice Richard, and tried to run the regression just with a constant and the dependent variable ={0,1,2,3} and I still get the error I don't know what to do right know.
            Last edited by Barc; 09 Aug 2014, 05:27.

            Comment


            • #7
              Can you try it on another machine? At this point I start suspecting corrupted or out of date installation. Try -update all, force- you might need to reinstall Stata.
              -------------------------------------------
              Richard Williams, Notre Dame Dept of Sociology
              Stata Version: 17.0 MP (2 processor)

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

              Comment

              Working...
              X